2008-01-14

Spring Security 2.0 + Spring 2.5 + Maven

If you're a Mavenite Spring 2.5 user, you'll need to jump through some extra hoops to use Spring Security 2, just as you had to when using Acegi with Spring 2.0.

First off you'll want to exclude org.springframework:spring-remoting and org.springframework:spring-support, as these two artifacts no longer exist in Spring 2.5.

In addition, you will most likely need to include org.springframework:spring-aop and org.springframework:spring-orm as dependencies, unless you're already using them.

That said, Spring Security's new config is nice. One particular security config file went from 118 lines to 24!

8 comments:

lkt said...

Hi,

where did you find the maven artifact for spring-security?

thanks

espenhw said...

Check out this blog entry for the details on Spring's milestone and snapshot repositories:

Deepa said...

Hi,
Can you please show me the contents of your pom file. I am running into java.lang.NoSuchMethodError: org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNecessary(Lorg/springframework/beans/factory/xml/ParserContext;Ljava/lang/Object;)

when I include spring security 2.0.3 with spring 2.5.5

If I switch back to spring 2.0.8 then everything works fine. I would prefer to use spring 2.5.x.

thanks

espenhw said...

Deepa,

That sounds like you're somehow getting the wrong version of the spring-aop artifact. Try using 'mvn dependency:tree -Dincludes=org.springframework' to debug the Spring part of your Maven dependencies; then use the dependencyManagement section of your POM to manage the version of all the Spring artifacts you use to the same version.

Hope this helps!

Jessica Rivera said...

Security companies can offer any number of services to their clients. They want to protect their clients from unseen threat. Sometimes, just having a security guard present on the premises will deter thieves and other types of criminals. how to start a pi company

for ict 99 said...

The effectiveness of IEEE Project Domains depends very much on the situation in which they are applied. In order to further improve IEEE Final Year Project Domains practices we need to explicitly describe and utilise our knowledge about software domains of software engineering Final Year Project Domains for CSE technologies. This paper suggests a modelling formalism for supporting systematic reuse of software engineering technologies during planning of software projects and improvement programmes in Final Year Project Centers in Chennai.

Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

Rathinam said...

Great post and I very happy to visit this blog. This is very helpful for me...!
Embedded System Course Chennai
Embedded Training in Chennai
job Openings in chennai
Unix Training in Chennai
Pega Training in Chennai
Linux Training in Chennai
Spark Training in Chennai
Social Media Marketing Courses in Chennai
Tableau Training in Chennai
Advanced Excel Training in Chennai
Embedded Training in Anna Nagar
Embedded Training in T Nagar

Kevin Davidson said...

It's very useful blog post with inforamtive and insightful content and i had good experience with this information. We, at the CRS info solutions ,help candidates in acquiring certificates, master interview questions, and prepare brilliant resumes.Find top Salesforce admin interview questions in 2020.
These Salesforce developer interview questions are highly helpful in 2020. You can read these Salesforce lightning interview questions and Salesforce integration interview questions which are prepared by industry experts.