<dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version>3.0.0.RELEASE</version> </dependency>This will bring in the spring-web, spring-security-core and commons-logging artifacts, and I would not fault you for thinking you're good to go. You're possibly following this tutorial or another among the many out there, and are providing a Spring config that references the http://www.springframework.org/schema/security namespace - and, at least for me, here's where things did not go as expected. At runtime, the error message I received was this:
Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
After a fair amount of Google'ing and Stack-Overflow'ing, I found the problem - and I reproduce it here to save myself (and hopefully you) the headache next time around: there is a dependency missing that looks like this:
<dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> <version>3.0.0.RELEASE</version> </dependency>
Now you should be good to go.
I really hope this helps someone in the future. I had the same issue, added spring-security-config in my pom, but still had the same issue. I use the m2e plugin in eclipse. I don't know the details, but I had to delete my .m2/repository folder and have eclipse regenerate it in order to see any difference.
ReplyDeleteThanks for your comment -
ReplyDeleteMuchos Gracias
ReplyDeleteYou are genius! Thanks a lot! )))
ReplyDeleteWell, "genius" is a bit over the top. But thank you, and I'm glad it helped.
ReplyDelete