【发布时间】:2012-06-18 08:06:30
【问题描述】:
我正在寻找如何接收活动/登录用户的正确方法。我将 Spring Security 3.1 与相同版本的 Spring MVC 一起使用。 整个想法基于this topic,文章中有更多评论:
@ActiveUser annotation from the article
我完全按照说明进行操作,但仍然出现这种错误:
No default constructor found; nested exception is java.lang.NoSuchMethodException: org.springframework.security.core.userdetails.User.<init>()]
在我的applicationContext.xml中我有这三个注释不是由作者直接提出的
<context:annotation-config />
<context:component-scan base-package="my.package.*" />
<mvc:annotation-driven />
什么可能导致这种问题?
【问题讨论】:
标签: spring-mvc spring-security spring-annotations