How to embed a spring mvc application with a pier

I have a working Spring MVC application (everything I wanted when it was deployed to jboss), and now I am looking for a way to launch the application from the bank. What I mean, when the jar starts, you first need to start some kind of web server in order to be able to run the application.

And I tried, like a lot of combinations with the pier (lost about two days), and I failed each of them, mostly suggestions from https://stackoverflow.com/a/3/2/16/16/16/ ...

My main weakness is that I really don't have a deep understanding of servlets, contexts, etc. Terms that I see regularly when viewing a google search, maybe I found a solution already, but did not understand it.

Has anyone done something like this? And yes, I asked a similar question for tomcat:

Maven tomcat plugin

+3
source share
1 answer

Yes, I have done this several times, and it is pretty straight forward if you know how bits work.

Since you explained that you don’t know how bits work, it will be a little more difficult. :)
But they are not too difficult to learn, and the easiest way to learn is to make sure that you go the right way.

The accepted answer is here: An executable war file that launches a berth without maven is one of the best tips you are going to get on this topic.

I would suggest:

  • Create a WAR to get started (which you probably use in your JBoss deployment)
  • WAR, Jetty ( , ).
  • , , Jetty WAR.

- , , , .

+2

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