SpringBoot理论

SpringBoot理论

SpringBoot是Spring框架的快速开发版本,降低了开发者在Spring框架下的开发成本,但并没有增强Spring的功能。

SpringBoot核心功能

1. 起步依赖

也就是各种springboot与其他框架整合出的starter
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
	<groupId>org.mybatis.spring.boot</groupId>
	<artifactId>spring-boot-starter-web</artifactId>
	<version>${mybatis.version}</version>
</dependency>

spring-boot-starter-web说明springboot内置了tomcat容器,spring-boot-starter-web让springboot的启动主方法可以用@MapperScan快速扫描到mapper的位置,同时也加入了大量JPA注解,如@Select、@Insert、@Update、@Delete等。
MyBatis官网B对mybatis-spring-boot-starter的说明:http://www.mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/

What is MyBatis-Spring-Boot-Starter?
The MyBatis-Spring-Boot-Starter help you build quickly MyBatis applications on top of the Spring Boot.

By using this module you will achieve:
(1) Build standalone applications.
(2) Reduce the boilerplate to almost zero.
(3) Less XML configuration.

2. 自动配置

在SpringBoot项目启动时,决定Spring的配置,也就是启动时的配置决策。 如为SessionFactory注入DataSource,在SpringBoot框架中,就是一个自动的过程,不需要开发者再写额外代码手动注入。
  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值