How to override managed version of dependencies in Spring Boot
Spring Boot allows us to change the Java version using:
<properties>
<java.version>1.8</java.version>
</properties>
Is there any property to change Java EE version or spring version in my spring Boot pom.xml
?
I am currently overriding the managed version using:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
Is there a better way to do this, like just setting properties?
Spring Boot 1.2.3 gives you spring 4.1.6 by default. How can I get spring Boot to point me to 4.1.5 just by setting properties?
source to share
This in yours pom.xml
should do it:
<properties>
<spring.version>4.1.5.RELEASE</spring.version>
</properties>
Everything straight from the docs .
Before moving on to redefining versions of dependencies overboard, heed this advice (from the link above):
Each Spring Boot release is designed and tested against a specific set of third-party dependencies. Overriding versions can lead to compatibility issues.
source to share