This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring security: No bean named 'springSecurityFilterChain' is defined

 
Tommi Vd
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have quite a problem with spring security.

Situation:

WEB.XML:


APPCONTEXT.XML:


ERROR:



My other services, dao, controllers are annotation based loaden by other xml files with an component scan...

Why am i getting this error?

Kind regards,
Thomas
 
Tommi Vd
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/solved
 
Eduardo Bueno
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the solution, it might be useful to others.
 
Tommi Vd
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i had different context files, the security configuration must be in my service context configuration
 
Trilochan Bharadwaj
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thomas,

Doesn't matter, YOU CAN keep those files separate, just give the following in:



prefix can be say your project name for example and spring's the folder or package where your xml config resources might be ... that way all your bean definitions would be available, I think it is a good practice to keep security config separate ... just a thought.

Trilochan.

Addendum: This is in web.xml
 
Tommi Vd
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks i will sure check on this
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!