0

I was looking for proper way how to recieve active/logged in user. I use Spring Security 3.1 with the same version of Spring MVC. The whole idea is based on this topic which was more commented in the article :

@ActiveUser annotation from the article

I completely follow the instructions but I still get this kind of error :

No default constructor found; nested exception is java.lang.NoSuchMethodException: org.springframework.security.core.userdetails.User.<init>()]

In my applicationContext.xml I have those three annotations which were not directly proposed by the author of

<context:annotation-config />
<context:component-scan base-package="my.package.*" />
<mvc:annotation-driven />

What could cause this kind of problem?

Community
  • 1
  • 1
Marek Surek
  • 23
  • 1
  • 6

1 Answers1

1

After hours of searching on internet I found out how should I solve the problem. As it might be useful for others I offer solution.

This kind of problem has in Spring 3.1(which I use) different solution than in Spring 3.0(for which the mentioned tutorial was ment). Great article about the problem was presented here : enter link description here

Marek Surek
  • 23
  • 1
  • 6