Adding spring mvc to a spring java “desktop” appli

2019-08-09 23:09发布

I have a Java desktop application which uses spring framework and I need to replace the Swing UI with a web front end. I understand that I will need to adapt many things to make things work with the MVC architecture. My concrete question is the following:

Will my application now have to run entirely in the application server?

I would appreciate if anyone could point me to some documentation that goes through a similar process.

Thanks!

1条回答
相关推荐>>
2楼-- · 2019-08-09 23:41

Technically yes, but Spring Boot makes it trivial to set up an embedded servlet container and package your entire application as a runnable jar. This is how we're deploying our applications to production; the only thing we need is a JRE on the server VM, and java -jar takes care of all of it.

I recommend using Maven with the Spring Boot plugin (there's also a Gradle plugin) with the repackage goal, and using the lightweight Undertow servlet engine instead of the default Tomcat.

查看更多
登录 后发表回答