Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Tomcat embed work in Spring Boot

Tags:

spring-boot

I am working with Spring Boot for building and deploying my Spring applications. I have a question on how Spring boot embeds the servers into the package. I have seen there are JAR files in the name of tomcat-embed-core, i.e. tomcat-embed-el. Is this the complete tomcat solution or does it internally use the installed tomcat in the local system?

If we want to use application servers like WAS 8.5, is there any solution provided by Spring Boot?

like image 920
Krishna Avatar asked Jan 08 '23 16:01

Krishna


1 Answers

Spring Boot has a complete Tomcat inside. It builds a so-called fat-jar with everything needed inside.

All you need to do to run such an application is:

java -jar spring-boot-app.jar

You don't need Tomcat installed in your system.

If you want to use external application server try starting with this: External Tomcat with Spring Boot

BTW: Spring Boot also supports other application servers like Jetty.

like image 56
raduy Avatar answered Jan 26 '23 19:01

raduy