我正在寻找如何接收活动/登录用户的正确方法。我将 Spring Security 3.1 与相同版本的 Spring MVC 一起使用。整个想法是基于这篇文章中更多评论的这个主题:
我完全按照说明进行操作,但仍然出现这种错误:
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 />
什么可能导致这种问题?