Programmatically Starting Spring Downloading to an Existing Embedded Application Server

I need to run Spring software applications programmatically on an existing, also programmatically created application server.

Running Spring boot using the embedded server is easy ...

servletContext = SpringApplication.run(SomeApplication.class, args);

But in my case I need to do something like

Server server = new Server(8080);
// add handler, but how?
server.start()

I am sure that there is a fairly simple solution, but Google does not help much, since all the results about running Spring with an embedded server.
Just for clarification. I do not want to pack the jar / war file and run it. I want to programmatically run the Spring boot application.

+4
source share

Source: https://habr.com/ru/post/1683233/


All Articles