目录
2、安装 Convert YAML and Properties File 的插件
Spring Boot它本身并不提供Spring框架的核心特性以及扩展功能,只是用于快速、敏捷地开发新一代基于Spring框架的应用程序。
也就是说,它并不是用来替代Spring的解决方案,而是和Spring框架紧密结合用于提升Spring开发者体验的工具同时它集成了大量常用的第三方库配置(例如Jackson, JDBC, Mongo, Redis, Mail等等),
Spring Boot应用中这些第三方库几乎可以零配置的开箱即用(out-of-the-box),大部分的Spring Boot应用都
只需要非常少量的配置代码,开发者能够更加专注于业务逻辑
1、敏捷式开发
2、spring boot其实不是什么新的框架,它默认配置了很多框架的使用方式, 就像maven整合了所有的jar包,spring boot整合了所有的框架
3、基于Spring框架的一站式解决方案
#可以换源
http://start.aliyun.com#默认勾选web、lombok、Mybatis组件

配置默认不加载数据源
- @SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
- public class Testspringboot02Application {
-
- public static void main(String[] args) {
- SpringApplication.run(Testspringboot02Application.class, args);
- }
-
- }


选中application.properties右键点击 Convert YAML and Properties File
application.properties->application.yml
application.properties
- # 应用名称
- spring.application.name=testspringboot02
- # 应用服务 WEB 访问端口
- server.port=8081
- #下面这些内容是为了让MyBatis映射
- #指定Mybatis的Mapper文件
- mybatis.mapper-locations=classpath:mappers/*xml
- #指定Mybatis的实体目录
- mybatis.type-aliases-package=com.zking.testspringboot02.mybatis.entity
application.yml
- mybatis:
- mapper-locations: classpath:mappers/*xml
- type-aliases-package: com.zking.testspringboot02.mybatis.entity
- server:
- port: 8081
- spring:
- application:
- name: testspringboot02