@SpringBootApplication
相当于
@SpringBootconfiguration
@EnableAutoconfiguration
@componentScan
配置文件优先级(优先级由高到低)
命令行参数(--server.port=8081)
来自 java:comp/env 的 JNDI 属性
Java 系统属性(System.getProperties(),-Dserver.port=8081)
操作系统环境变量
RandomValuePropertySource 配置的 random.* 属性值
配置文件(Properties 文件比YAML文件高,内层config目录比外层高,项目同级目录下的比resource高)
@Configuration 注解类上的 @PropertySource 指定的配置文件
通过SpringApplication.setDefaultProperties 指定的默认属性
启动过程
整合tomcat
整合mybatis