Spring Security web classes are not available error

Another random error/bug I came across playing around with Spring MVC, when implementing security I kept getting an error in my security context xml file telling me that required spring security web classes are not available.

While I had spring-security-config in my pom.xml file it seems one of the benefits of Maven had again sh*t itself and a required dependency was not being pulled in.

You need to manually add spring-security-web which solved the issue for me, seems to be a known bug.

<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-web</artifactId>
    <version>3.1.4.RELEASE</version>
</dependency>

Make sure you update the version to match your spring-security-config dependency.

Source: http://stackoverflow.com/a/9677714/1445352

Advertisements

Published by

Alan Feekery

Developer, Gamer, Musician, Cyclist and big Motorsport fan... enjoys the odd cup of coffee :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s