2017-12-27 297 views
0

默认情况下,Spring Boot具有很多依赖,比如Web/DB/Security以及诸如嵌入式Tomcat等许多其他功能。最小配置的弹簧启动

在大多数项目中,我只需要依赖注入,阅读application.properties参数和TestNG支持。没有其他的。

问题是如何以最小的配置获得Spring Boot?

+0

只需添加springboot父母的依赖。没有别的 – pvpkiran

+0

访问http://start.spring.io/并选择你真正需要的项目。 – Ele

+1

'spring-boot-starter'是最基本的启动器......它不包含任何web-dependencies,它就是'spring-boot-starter-web'(以及类似的东西)。 –

回答

3

如果你需要用最小的要求Springboot配置,请访问此链接http://start.spring.io/

enter image description here

正如你所看到的,你可以选择你的项目的依赖关系。

您可以切换到一个完整的形式有很多选择:

enter image description here

,并选择相关性:

enter image description here

+0

我想这是最好的回答:) – Lenar