How to know which tomcat version embedded in spring boot
Solution 1
Via http://search.maven.org/, in https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/1.2.5.RELEASE/spring-boot-dependencies-1.2.5.RELEASE.pom:
<tomcat.version>8.0.23</tomcat.version>
Solution 2
You can also check the version without leaving your IDE by seeing the effective pom.
For example, if you are using IntelliJ you can view effective pom by right clicking pom.xml > Maven > Show effective POM.
...or from the command line by issuing mvn help:effective-pom
Solution 3
or For Gradle print the dependepency tree via the console with
./gradlew dependencies
Example snippet from output:
...
| +--- org.springframework.boot:spring-boot-starter-tomcat:2.1.0.RELEASE
| | +--- javax.annotation:javax.annotation-api:1.3.2
| | +--- org.apache.tomcat.embed:tomcat-embed-core:9.0.12
| | +--- org.apache.tomcat.embed:tomcat-embed-el:9.0.12
| | \--- org.apache.tomcat.embed:tomcat-embed-websocket:9.0.12
| | \--- org.apache.tomcat.embed:tomcat-embed-core:9.0.12
...
In my example above it is tomcat version 9.0.12
Solution 4
You can look at http://mvnrepository.com/
:
http://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-tomcat/1.2.5.RELEASE
Below you have section Compile Dependencies
and you can see that it uses Tomcat 8.0.23
.
Solution 5
You can check the versions of all the dependencies in the dependency tree.
for that:
- go to the directory of pom.xml
-
run the following command:
$ mvn dependency:tree
[INFO] Scanning for projects... enter code here [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building {Project Name} [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ spring-mvc-logback --- [INFO] com.sj.common:spring-mvc-logback:war:1.0-SNAPSHOT [INFO] +- org.springframework:spring-core:jar:4.1.6.RELEASE:compile [INFO] +- org.springframework:spring-webmvc:jar:4.1.6.RELEASE:compile [INFO] | +- org.springframework:spring-beans:jar:4.1.6.RELEASE:compile [INFO] | +- org.springframework:spring-context:jar:4.1.6.RELEASE:compile [INFO] | | \- org.springframework:spring-aop:jar:4.1.6.RELEASE:compile [INFO] | | \- aopalliance:aopalliance:jar:1.0:compile [INFO] | +- org.springframework:spring-expression:jar:4.1.6.RELEASE:compile [INFO] | \- org.springframework:spring-web:jar:4.1.6.RELEASE:compile [INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.12:compile [INFO] | \- org.slf4j:slf4j-api:jar:1.7.12:compile [INFO] +- ch.qos.logback:logback-classic:jar:1.1.3:compile [INFO] | \- ch.qos.logback:logback-core:jar:1.1.3:compile [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.937 s [INFO] Finished at: 2015-06-19T19:17:54+08:00 [INFO] Final Memory: 13M/308M [INFO] ------------------------------------------------------------------------
And you will be able to watch all the dependencies and versions associated with that dependency.
bNd
Updated on November 17, 2021Comments
-
bNd over 2 years
I used spring boot in project. It has inbuild tomcat server. I find out a jar
spring-boot-starter-tomcat-1.2.5.RELEASE.jar
. I required to do certain tomcat related configuration on linux server.How can I get to know which tomcat version used in this?