Error using Spring authorize tag to check to see if user is logged in?

前端 未结 2 1463
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-19 10:12

Trying to test to see if a user is logged in I am using the following code:

<%@ taglib prefix=\"sec\" uri=\"http://www.springframework.org/security/tags\" %&         


        
2条回答
  •  野的像风
    2021-02-19 10:53

    Setting use-expressions="true" in the http element will work but means all your security settings in both Java code and security contexts must use expression notations. This can be a problem if you are currently using the standard security notations.

    To use both expressions and standard notations just declare a new bean in your security context like so -

    
    

提交回复
热议问题