#oauth2 security expressions on method level

前端 未结 5 718
囚心锁ツ
囚心锁ツ 2020-12-24 08:34

What should I do to be able to use #oauth2 security expressions on method level like on the example below?

@RequestMapping(value = \"email\", method = Reques         


        
5条回答
  •  再見小時候
    2020-12-24 09:03

    For me, it was the combination of this answer

    // spring configuration class annotation
    @EnableGlobalMethodSecurity(prePostEnabled = true)
    

    and this other answer

    // gradle dependencuy
    compile('org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.0.4.RELEASE')
    

提交回复
热议问题