× - 코드 및 콘솔 화면은 [ code ] 내용 [ /code ] 태그 처리하여 주세요.
- 강조하고자 하는 내용은 [ b ] 내용 [ /b ] 태그 처리하여 주세요.

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

  • helloworld
    (stdio.h)
  • helloworld's Avatar 이 글의 작성자
  • Offline
  • Junior
  • Junior
더보기
29 Jan 2016 20:42 - 29 Jan 2016 21:10 #508 작성자: helloworld
helloworld 님의 글: Spring Security에서 [permitAll] 설정 오류가 발생합니다.
설정은 다음과 같습니다.

<http auto-config="true">
....
<intercept-url pattern="/main.do" access="permitAll" />
....
</http>


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

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


docs.spring.io/spring-security/site/docs...rence/el-access.html
를 참고해서 설정하였는데 혹시 원인을 아신다면 도움 부탁할께요..
더보기
29 Jan 2016 21:12 #509 작성자: appsroot
appsroot 님의 답글: Spring Security에서 [permitAll] 설정 오류가 발생합니다.
기존 설정에 <http auto-config="true" use-expressions="true"> 과 같이 use-expressions="true" 설정을 추가해야 합니다.

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

To use expressions to secure individual URLs, you would first need to set the use-expressions attribute in the <http> element to true.

  • helloworld
    (stdio.h)
  • helloworld's Avatar 이 글의 작성자
  • Offline
  • Junior
  • Junior
더보기
29 Jan 2016 21:50 - 29 Jan 2016 21:51 #511 작성자: helloworld
helloworld 님의 답글: Spring Security에서 [permitAll] 설정 오류가 발생합니다.
감사합니다! 잘 해결했습니다. 그런데 이번에는..

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는 기본으로 사용 가능한 것으로 아는데.. 왜일까요?
더보기
30 Jan 2016 10:19 - 30 Jan 2016 10:19 #512 작성자: appsroot
appsroot 님의 답글: Spring Security에서 [permitAll] 설정 오류가 발생합니다.

access="ROLE_USER"


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

access="hasRole('ROLE_USER')"

Time to create page: 0.058 seconds
Powered by Kunena Forum