@Override public void configure(WebSecurity web) throws Exception { web.expressionHandler(EXPRESSION_HANDLER); }
@Override public void configure(WebSecurity web) throws Exception { // @formatter:off web .expressionHandler( new DefaultWebSecurityExpressionHandler() { @Override protected SecurityExpressionOperations createSecurityExpressionRoot(Authentication authentication, FilterInvocation fi) { WebSecurityExpressionRoot root = (WebSecurityExpressionRoot) super.createSecurityExpressionRoot(authentication, fi); root.setPermissionEvaluator(basePermissionEvaluator); root.setDefaultRolePrefix(""); //remove the prefix ROLE_ setDefaultRolePrefix(""); return root; } }) .ignoring() .antMatchers(HttpMethod.OPTIONS) .antMatchers("/" , "/favicon.ico" , "/app/v2/**" , "/console/**" , "/api/browser/**" , "/admin/**"); // @formatter:on }