SpringBoot是用来简化基于Spring应用的初始搭建以及开发过程的高度集成框架。该框架包含很多默认配置,为不同的Spring模块提供了许多依赖项,大大简化了开发者重复的配置工作。因此,SpringBoot在快速应用开发领域RAD(rapid application development)被广泛使用。
快速构建独立的基于Spring架构的应用,无需外部依赖Servlet容器。
无配置集成主流开发框架,如MyBatis/Thymeleaf/SQL等。
自动配置Spring应用的相关参数(添加注解)。
starter模块和maven的集成使管理依赖版本和使用默认配置更精简。
提供生产就绪型功能,如指标,健壮(robust)检查和外部配置。
没有代码产生和Spring的xml文件配置需求。
name | description |
---|---|
spring-boot-starter | The core Spring Boot starter, including auto-configuration support, logging and YAML. |
spring-boot-starter-data-jpa | Support for the “Java Persistence API” including spring-data-jpa, spring-orm and Hibernate. |
spring-boot-starter-data-redis | Support for the REDIS key-value data store, including spring-data-redis. |
spring-boot-starter-jdbc | Support for JDBC databases. |
spring-boot-starter-security | Support for spring-security |
spring-boot-starter-test | Support for common test dependencies, including JUnit, Hamcrest and Mockito along with the spring-testmodule. |
spring-boot-starter-thymeleaf | Support for the Thymeleaf templating engine, including integration with Spring. |
spring-boot-starter-velocity | Support for the Velocity templating engine. |
spring-boot-starter-web | Support for full-stack web development, including Tomcat and spring-webmvc. |
name | version |
---|---|
Eclipse IDE | 4.19.0 |
SpringBoot | 2.3.1.RELEASE |
Apache Tomcat | 9.0.36 |
以简单实现MyBatis和Thymeleaf的SpringBoot项目为例
GitHub地址:https://github.com/Mike-Ying/studentInfoManage
SpringBoot应用程序的入口点是使用@SpringBootApplication注释的类:
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
原文:https://www.cnblogs.com/canblogs/p/14880064.html