LoginSignup
15

More than 5 years have passed since last update.

Spring BootのTomcatのバージョンを調べてみる

Posted at

最近Spring Bootを始めてちょいちょい気になることが出てくるので備忘として。
Spring BootではTomcatが組み込まれており、いちいちTomcatを入れて設定してうにゃうにゃみたいな作業がないので便利。ただ、そもそもTomcatのバージョンっていくつよ?って気になって調べてみた。

基本的に起動時のコンソールにこんな感じで出力されている(最後の方)。

2015-12-07 22:34:57.396  INFO 3276 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.0.28

これはこれでいいのだが、pom.xmlから辿ってみた。

pom.xml
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency>

バージョンの指定がないから親Pomを見てみる、親Pomはこんな感じで定義されているので、、、

pom.xml
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.3.0.RELEASE</version>
</parent>

以下を見に行く。
https://github.com/spring-projects/spring-boot/blob/v1.3.0.M2/spring-boot-starters/spring-boot-starter-parent/pom.xml
orzここでも定義されていない。。。
よく見ると更に親Pomがあるようだから今度はそれを見に行く。
ちなみにこんな感じで指定してあった。

親pom.xml
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-dependencies</artifactId>
    <version>1.3.0.M2</version>
    <relativePath>../../spring-boot-dependencies</relativePath>
</parent>

以下を見に行く。
https://github.com/spring-projects/spring-boot/blob/master/spring-boot-dependencies/pom.xml

すると、、あった!

おじいちゃんpom.xml
<tomcat.version>8.0.28</tomcat.version><dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-core</artifactId>
    <version>${tomcat.version}</version>
</dependency>

こんなことしなくてもきっとドキュメントとかに書いてあるのかもしれない。。。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15