Spring boot app with Embedded tomcat

Viewed 7892

I am working on a project, we are using Spring-Boot, STS. I just start the project with right click on main and run as spring boot app and it simply runs. Now I am asked to run it with Embedded tomcat on some other machine like Amazon EC2 instance. In normal spring project what I used to do is, create a war file, place in tomcat->webapps folder and start it from bin. In case of embedded tomcat how would I run my app without tomcat. where will my war(which includes embedded tomcat dependencies) run? Please suggest some solution, this is first time working with spring boot and embedded tomcat. Appreciate your suggestion.

4 Answers

Convert it to jar using your IDE you are using..

Then :

On Windows, you have to set the java.exe(with full path) in the environment variable(with variable name = java). and then you can run java -jar "jar name with the full path"

If path is not set then what you have to do is : Example :

"C:\Program Files\Java\jdk1.7.0_67\bin\java.exe" -jar "jar name with the full path"

- it will work 100% - check it out

thanks :)

Related