snap
snap

Reputation: 1925

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.

Upvotes: 3

Views: 4152

Answers (2)

DEP
DEP

Reputation: 1

if using maven it's pretty easy! This would get the latest from version 9.0.0 to 9.1.0.

pom.xml:

<properties>        
  <tomcat.version>[9.0,9.1)</tomcat.version>
</properties>

Upvotes: 0

Golam Mazid Sajib
Golam Mazid Sajib

Reputation: 9457

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+

Upvotes: 1

Related Questions