0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Creates Spring Boot application runs in Java Servlet container

Posted at

On Servlet 3.0 container

If you plan to run your project on Servlet 3.0 container (e.g. Apache Tomcat start from 7.0), it is very easy to convert the project from run in command line to run in a Servlet container.

  1. in software project management tool, change generate file format from jar to war, and prevent to append version number to file name
  2. include org.springframework.boot:spring-boot-starter-tomcat into project's dependency
  3. change the class which annotated with @SpringBootApplication, to extend org.springframework.boot.web.servlet.support.SpringBootServletInitializer

That's all!

Reference

  1. Deploy a Spring Boot WAR into a Tomcat Server
0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?