Spring MVC 或 Spring Boot [英] Spring MVC or Spring Boot

查看:46
本文介绍了Spring MVC 或 Spring Boot的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于大型公司(web)项目,您推荐使用 Spring MVC 还是 Spring-Boot?

For a large company (web) project, do you recommend using Spring MVC or Spring-Boot?

Spring-Boot 在配置方面,相比 Spring MVC 非常容易.

Spring-Boot, in terms of configuration, is very easy compared to Spring MVC.

不知我使用Spring-Boot是否可以拥有Spring MVC同样的优势?

I wonder if I use Spring-Boot can have the same advantages of Spring MVC?

你有什么推荐?

推荐答案

我个人的建议是一定要使用 Spring Boot,原因有很多.

My personal advice is to definitely use Spring Boot for many reasons.

  1. 首先,Boot 是Spring 的未来".这意味着使用 Boot您可以从 Spring 社区的许多承诺中受益.大多数今天的Spring项目完全是与 Boot 集成,甚至社区也开始开发许多基于 Boot 的应用程序.例如用于管理和监控.我可以建议查看 Spring Boot Admin

使用 Spring Boot,您可以受益于非常好的和有用的功能,例如用于管理和监控的执行器和远程外壳,即使用非常适合生产的功能改进您的应用程序很有用.

With Spring Boot you can benefit from very nice and useful features such as actuator and remote shell for managing and monitoring, that improves your application with production ready features that are very useful.

非常好的和强大的属性和配置控件 - 你可以使用 application.properties/yml 配置您的应用程序并以非常简单和令人印象深刻的方式延长靴子,即使是覆盖方面的管理非常强大.

Very nice and powerful properties and configuration controls - you can configure your application with application.properties/yml and extend the boot in a very simple and impressive way, even the management in terms of overriding is very powerful.

它是最早的微服务就绪平台之一,在我看来现在它是最好的!就算不搭建微服务带引导的项目您可以受益于使用现代方法你有一个自动一致的 jar 可以从所有功能中受益我上面描述的,或者如果您愿意,您可以强加包装作为经典战争并在任何容器中部署您的战争你想要.

It is one of the first micro-service ready platforms, and in my opinion nowadays it is the best! Even if you don't build a micro-service project with boot you can benefit of using a modern approach in which you have a auto-consistent jar that can benefit from all the features that I described above or if you prefer you can impose the packaging as a classical war and deploy your war in any of the containers that you want.

使用智能和约定优于配置的方法,减少您的启动和配置阶段项目显着.事实上,您有一组启动 Maven 或 Gradle 依赖项简化依赖管理.然后用自动配置特性你可以从很多中受益通过条件配置框架引入的标准配置在 Spring 4. 你可以用你的特定配置只是根据您可以在 Boot 的自动配置 JAR 中看到的约定依赖性.请记住,Spring 是开源的,您可以查看代码.我认为文档也很好.

Use of an intelligent and convention over configuration approach that reduces the startup and configuration phase of your project significantly. In fact you have a set of starter Maven or Gradle dependencies that simplify the dependency management. Then with the auto-configuration characteristic you can benefit from a lot of standard configurations, that are introduced through the Conditional Configuration framework in Spring 4. You can override it with your specific configurations just defining your bean according with the convention that you can see in the auto-configure JAR of the Boot dependency. Remember that Spring is open-source and you can see the code. Also the documentation in my opinion is good.

Spring 初始化程序是一个很酷的工具,可在此链接中获得:https://start.spring.io/ 是一个非常酷的工具,可以快速创建您的项目方式.

Spring initializer is a cool tool attainable at this link: https://start.spring.io/ is a very cool tool just to create your project in a very fast way.


我希望这个反思可以帮助你决定什么是最好的解决方案.


I hope that this reflection can help you decide what is the best solution.

这篇关于Spring MVC 或 Spring Boot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆