Created
June 23, 2018 05:23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javabycode.security; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler; | |
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; | |
import org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration; | |
import org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler; | |
@Configuration | |
@EnableGlobalMethodSecurity(prePostEnabled = true, proxyTargetClass = true) | |
public class MethodSecurityConfig extends GlobalMethodSecurityConfiguration { | |
@Override | |
protected MethodSecurityExpressionHandler createExpressionHandler() { | |
return new OAuth2MethodSecurityExpressionHandler(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment