Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change embedded tomcat version on spring boot

I want to downgrade my embedded tomcat from 8.5.6 to 8.5.51.

In my logs, I can find the information below:

"spring-boot-starter-tomcat/1.4.3.RELEASE/spring-boot-starter-tomcat-1.4.3.RELEASE.jar" ".m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.6/tomcat-embed-core-8.5.6.jar"

But in my pom.xml files, I do not have any references to tomcat.

Doing a grep command, there is no return to 'spring-boot-starter-parent' or 'spring-boot-starter-tomcat'.

Where and how can I explicitly add the tomcat version I want?

like image 691
Hugo Guimarães Avatar asked Feb 13 '26 12:02

Hugo Guimarães


1 Answers

if your project or one of your dependencies needs to override the version of a transitive dependency that is managed by the parent POM, just add a version property for that dependency. For this rule to work the parent POM has to define version properties for all the dependencies that it manages (the spring-boot-starter-parent does this).

<properties>
        <tomcat.version>8.5.51</tomcat.version>
</properties>
like image 149
Armando Ballaci Avatar answered Feb 16 '26 00:02

Armando Ballaci