简体   繁体   English

用于 Wildfly 部署的 Spring MVC 或 Spring Boot

[英]Spring MVC or Spring Boot for wildfly deployment

I am converting Java web project into Spring Project.我正在将 Java Web 项目转换为 Spring 项目。 (10 JSP and 5 controllers connecting to DB) (10 个 JSP 和 5 个控制器连接到 DB)

We are using Wildfly server for deployment.我们正在使用 Wildfly 服务器进行部署。

Is there any use of creating Spring Boot project (though i have facilities like actuators, starters etc.)创建 Spring Boot 项目有什么用吗(尽管我有执行器、启动器等设施)

or或者

Is it fine to create Spring MVC Project and deploy the war in Wildfly as i am not using any container here and spring boot project will be an overhead?是否可以创建 Spring MVC 项目并在 Wildfly 中部署战争,因为我在这里没有使用任何容器并且 Spring Boot 项目将是一个开销? Basically i am finding why should i use spring boot here?基本上我发现为什么我应该在这里使用弹簧靴?

it depends.这取决于。

Spring boot is just SpringMVC + Tomcat in one JAR (very simplified definition, I know). Spring Boot 只是一个 JAR 中的SpringMVC + Tomcat (我知道是非常简化的定义)。

If you have an existing and working Wildfly Server, use it.如果您有一个现有的可用 Wildfly 服务器,请使用它。 Compile your web app as WAR an deploy it.将您的 Web 应用程序编译为 WAR 并部署它。 You will have also better configuraiton, server update and server bugfixing possibilities.您还将拥有更好的配置、服务器更新和服务器错误修复的可能性。 At least that was in my case, as my team mates had a lot of experience with Wildfly.至少在我的情况下是这样,因为我的队友对 Wildfly 有很多经验。

We are using SpringBoot for small pure REST (micro)services (without HTML, JSP), since they are fast to implement and to deploy (just run a jar file).我们将 SpringBoot 用于小型纯 REST(微)服务(没有 HTML、JSP),因为它们可以快速实现和部署(只需运行一个 jar 文件)。 All of these applications have their own Tomcat server - with own PORT.所有这些应用程序都有自己的 Tomcat 服务器 - 有自己的端口。 If you want a new Tomcat version you have to recompile your application.如果您想要一个新的 Tomcat 版本,您必须重新编译您的应用程序。 This could be a disadvantage (but not realy).这可能是一个缺点(但不是真的)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM