Spring Security에서 [permitAll] 설정 오류가 발생합니다.

조회 13,437 · 댓글 3
stdio.hstdio.h작성자2016년 1월 29일
설정은 다음과 같습니다.


....

....


발생한 에러는 다음과 같네요.

Caused by: java.lang.IllegalArgumentException: Unsupported configuration attributes: [permitAll]


https://docs.spring.io/spring-security/site/docs/3.0.x/reference/el-access.html
를 참고해서 설정하였는데 혹시 원인을 아신다면 도움 부탁할께요..
appsrootappsroot2016년 1월 29일
기존 설정에 과 같이 use-expressions="true" 설정을 추가해야 합니다.

언급하신 링크에도 잘 표현되어 있습니다.

To use expressions to secure individual URLs, you would first need to set the use-expressions attribute in the element to true.
stdio.hstdio.h2016년 1월 29일
감사합니다! 잘 해결했습니다. 그런데 이번에는..


HTTP Status 500 - Failed to evaluate expression 'ROLE_USER'

java.lang.IllegalArgumentException: Failed to evaluate expression 'ROLE_USER'

org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 0): Field or property 'ROLE_USER' cannot be found on object of type 'org.springframework.security.web.access.expression.WebSecurityExpressionRoot'


오류가 발생하고 있습니다. ROLE_USER는 기본으로 사용 가능한 것으로 아는데.. 왜일까요?
appsrootappsroot2016년 1월 30일
access="ROLE_USER"


위 설정을 다음과 같이 변경합니다.

access="hasRole('ROLE_USER')"

로그인 후 답글을 남길 수 있습니다.