Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Boot use always latest tomcat version

I have a spring boot application and I want to always use the latest tomcat version, or even better the latest patched tomcat version of a given major and minor version:

F.e the latest version of 8 or the latest of 8.5. (like 8.5.32)

So, I would get the latest security patches if I rebuild my application.

I know I can manual give in one concrete version inside the properties. But this would get fast outdated and I don't want to have to adjust this all the time manually.

like image 724
snap Avatar asked Mar 12 '26 05:03

snap


1 Answers

If you use gradle then you can do it using this configuration:

compile('org.springframework.boot:spring-boot-starter-web') {
    exclude module: "spring-boot-starter-tomcat"
}
compile 'org.apache.tomcat.embed:tomcat-embed-core:+'
compile 'org.apache.tomcat.embed:tomcat-embed-el:+'
compile 'org.apache.tomcat.embed:tomcat-embed-logging-juli:+'
compile 'org.apache.tomcat.embed:tomcat-embed-websocket:+'

if you want to give specific version then use version+

like image 149
GolamMazid Sajib Avatar answered Mar 13 '26 19:03

GolamMazid Sajib