0

Anyone know can I use and at the same time in spring security.xml? currently , I am using UsernamePasswordAuthenticationFilter under tag in xml. But when I set the auto-config to 'true' and put @Secured("ROLE_ADMIN") in controller class, I am getting exception like expecting contructor or args with no method.

How can I solve this problem? thanks

sudo
  • 1,525
  • 7
  • 34
  • 59

1 Answers1

1

Forget about using auto-config. It is more trouble than it is worth. Just add the configuration elements you want manually.

If you are getting an error about not having a null constructor, then this is probably the reason. Always post your exception though.

Community
  • 1
  • 1
Shaun the Sheep
  • 22,353
  • 1
  • 72
  • 100