2012-07-30 2 views
0

나는 서블릿 컨테이너 용 Tomcat을 사용하고 있으며 나는 매일 debug하도록 catalina.out 로그를 확인해야합니다. 그러나 익명의 사용자가 로그인을 시도하면, Spring Security 인터셉터는 예외를 던지며, catalina.out 로그 파일을 넘칩니다. 다음과 같은 로그 :봄 보안 로깅을 비활성화하는 방법

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) 
at java.lang.Thread.run(Thread.java:722) 
Caused by: org.springframework.security.authentication.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext 
at org.springframework.security.access.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:327) 
at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:197) 
at org.springframework.flex.security3.EndpointInterceptor.preProcess(EndpointInterceptor.java:97) 
at org.springframework.flex.core.MessageInterceptionAdvice.invoke(MessageInterceptionAdvice.java:62) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 
at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:124) 
... 52 more 

Tomcat에서 스프링 보안 로그인을 비활성화하는 방법은 무엇입니까?

답변

3

로그 수준이 DEBUG로 설정되고 필터 체인에 AnonymousAuthenticationFilter가없는 경우 로그에 AuthenticationCredentialsNotFoundException이 표시됩니다.

FAQ을 참조하십시오.

그래서 네임 스페이스 구성 대신 보안 응용 프로그램 컨텍스트에서 전통적인 bean 구성을 사용한다고 가정합니다. 당신이 예외를 제거하려면 대안 documentation

에 설명 된대로이 question에서 언급 한 바와 같이 당신은 당신이 바람둥이에

org.springframework.security.level=INFO 

의 로그 레벨을 설정할 수 있습니다, 당신의 애플리케이션 컨텍스트에 anonymousAuthenticationFilter을 추가 할 수 있습니다 .