springboot入门与学习

  • 快速创建spring应用

    SSM: 导包 写配置 启动应用

  • 提供可选的starter 简化应用整合

    starter: 场景启动器(web JSON 缓存 异步 数据库)
    只需要配置对应的场景启动器 就能使用相应的功能

简化开发 简化配置 简化部署 简化运维 简化监控

  • 摒弃xml配置 改为注解
    @Configuration
    @RestController
    @Bean
    @Import

yaml配置文件

所有的配置都会在autocoonfig有对应的默认配置

1
2
3
4
5
6
7
8
9
10
11
12
13
spring:
datasource:
url: jdbc:mysql://localhost:3306/study
username: root
password: root

mybatis:
# 解析xml文件的路径
mapper-locations: classpath:/mapper/*.xml
configuration:
# 数据库字段转驼峰命名
map-underscore-to-camel-case: true