How to enforce a specific Spring Security version dependency in Spring Boot
Solution 1:
I think the current answer to this question can be found here:
Gradle
https://docs.spring.io/spring-security/reference/getting-spring-security.html#getting-gradle-boot
e.g. for Spring Security version 5.7.0-SNAPSHOT specify property
ext['spring-security.version']='5.7.0-SNAPSHOT'
in your Gradle file
Maven
https://docs.spring.io/spring-security/reference/getting-spring-security.html#getting-maven-boot
e.g. for Spring Security version 5.7.0-SNAPSHOT specify property
<properties>
<!-- ... -->
<spring-security.version>5.7.0-SNAPSHOT</spring-security.version>
</properties>
Also remember that if you're going to try out new builds that might not exist in public Maven repositories, you might have to add Spring's own repositories, for example https://repo.spring.io/snapshot
.