활성/로그인 한 사용자를 수신하는 올바른 방법을 찾고있었습니다. Spring Security 3.1을 동일한 버전의 Spring MVC와 함께 사용합니다. 전체 아이디어는 더 이상 문서에 주석했다 this topic을 기반으로합니다 : 나는 완전히 지침을 따르하지만 난 여전히 이런 종류의 오류를 얻을주석 기반 사용자 검색 스프링 보안
@ActiveUser annotation from the article
: 내의 ApplicationContext에서
No default constructor found; nested exception is java.lang.NoSuchMethodException: org.springframework.security.core.userdetails.User.<init>()]
합니다. xml 나는 저자가 직접 제안하지 않은 세 가지 주석을 가지고있다.
<context:annotation-config />
<context:component-scan base-package="my.package.*" />
<mvc:annotation-driven />
이런 종류의 문제가 발생할 수있는 이유는 무엇입니까?