Home > Blockchain >  How do i deploy a Spring Boot Web Application?
How do i deploy a Spring Boot Web Application?

Time:12-17

I don't know how I am deploying or run my Spring App outside the IDE. Can I just run it over a Web server like Apache or Nginx? And if not, how do I run the normal Tomcat server, do I just have to execute the file on my Server? What's Performance wise, the best thing I can do. Greetings

CodePudding user response:

If you want to deploy your Spring project to your server (it could be your local server or Cloud server), you will need WAS such as Tomcat. If you build the project in Spring Boot, then you don't have to install WAS becuz it is already contained when you create jar file. So what you have to do with Spring Boot is run java -jar filename.jar as @cichyvx said. If you build it in Spring then you have to install Tomcat. In this case, you have to rewrite server.xml in Tomcat/Conf. And run sh ./startup.sh in Tomcat/bin. What I suggest is building application in Spring Boot so you don't need to bother yourself to install and change Tomcat files.

CodePudding user response:

easiest way its just build your application using maven or gradle, find jar file in .m2 folder, open console from that folder and type java -jar filename.jar

  • Related