简体   繁体   中英

Which version of Spring framework security is compatible with Spring framework 5.3.4

Currently, I am using

<springFramework.version>3.2.3.RELEASE</springFramework.version>
<springFrameworkSecurity.version>3.1.4.RELEASE</springFrameworkSecurity.version>

I want to move to

<springFramework.version>5.3.4.RELEASE</springFramework.version>
<springFrameworkSecurity.version> ? </springFrameworkSecurity.version>

According to the documentation for the latest Spring Security:

Since Spring Security makes breaking changes only in major releases, it is safe to use a newer version of Spring Security with Spring Boot.

The Spring Framework version you're moving to is 5.3.4 , so I would assume that any 5.XX version of Spring Security should work.

If that works, let us know by marking the answer as solved , If not. leave a comment.

[Update]: this Won't work, as sprint security has separate bom from spring-framework bom

You can use Spring Bom to get managed dependencies, to get rid of defining versions of related dependencies, you can read more about BOM here Heres and example of spring BOM defined in maven

<dependencyManagement>
<dependencies>
    <!-- ... other dependency elements ... -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-framework-bom</artifactId>
        <version>5.1.9.RELEASE</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>
</dependencies>

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