X
X
xllnc2019-08-18 09:28:58
Java
xllnc, 2019-08-18 09:28:58

Can a Spring project be run on a remote server?

I wrote the simplest application in spring. Which accepts a GET request and returns an HTML page. Everything works on localhost. localhost:8080/indexand it shows the index.html page
So the question is, is it possible to somehow run it on a remote server, so that I can, for example, get this page by url - address, well, like all ordinary web applications.
If possible, how? Can you give an example?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan, 2019-08-18
@Blackeyed7

Hello!
In short, yes, you can))))
And if in detail, then read on:
1) the Spring application can be run on Tomcat, etc. Accordingly, you need a VPS, install tomcat. And then build the war project and upload it to the server.
https://docs.spring.io/spring-boot/docs/current/re...
2) you can deploy an application without third-party software (self-contained app)
https://docs.oracle.com/javase/8/ docs/technotes/gu...
List of useful links:
https://www.baeldung.com/tomcat-deploy-war
https://forum.vestacp.com/viewtopic.php?t=18378
https://spring. io/blog/2014/03/07/deploying-spring...
https://docs.spring.io/spring-boot/docs/current/re...
Video -
https://www.youtube.com/watch?v=kT_xEflmaGE&list=P...
If you use Intellij IDEA, then when you press RMB (provided that you have already configured the deployment parameters), you can immediately upload the project to the server from the program

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question