简体   繁体   中英

Where is spring-security-web in 4.1.1 on Maven Repository?

I've worked with Spring 3.x flavors for a while and I am making the jump to 4.1.1

I use Maven Repository to find dependencies and packages, and when I go to the site for spring-security-web or spring-security-core 3.2.5 is this highest release version available. However, 4.1.1 are available for all of the non-security related spring dependencies.

What gives? Is there a problem with Spring 4 security?

Spring Security versions doesn't need to match Spring Framework versions.

This is citation from Spring Security docs :

Using Spring 4 and Maven

Spring Security builds against Spring Framework 3.2.8.RELEASE, but is also tested against Spring Framework 4.0.2.RELEASE. This means you can use Spring Security 3.2.5.RELEASE with Spring Framework 4.0.2.RELEASE. The problem that many users will have is that Spring Security's transitive dependencies resolve Spring Framework 3.2.8.RELEASE causing all sorts of strange classpath problems.

So it is possible to use Spring Security 3.2.5.RELEASE with Spring 4.0.2.RELEASE for sure. But this is talking about Maven usage. I personally believe you can use Spring Security 3.2.5.RELEASE with latest version of Spring Framework without problems.

I would suggest to use Spring Boot and it should provide you stable matrix of Spring versions. Latest stable version of Spring Boot is 1.1.8.RELEASE, which cover Spring Framework 4.0.7.RELEASE and Spring Security 3.2.5.RELEASE.

There is no Spring Security in verison 4. At least not a final release. If you take a look at the project page ( http://projects.spring.io/spring-security/ ) you can see that the current release is 3.2.5.

Version 4 is currently being worked on, but is only available as a Milestone 2. You can use the Spring Milestones repository to get access to this milestone version if you want:

<dependencies>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>4.0.0.M2</version>
    </dependency>
</dependencies>
<repositories>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>http://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM