4.springBoot(属性注入)获取配置的几种方式
将配置文件里的配置注入到代码中,这里主要介绍三种属性注入的方式
1.引入依赖
org.springframework.boot spring-boot-starter org.springframework.boot spring-boot-starter-test test
将配置文件里的配置注入到代码中,这里主要介绍三种属性注入的方式
1.引入依赖
org.springframework.boot spring-boot-starter org.springframework.boot spring-boot-starter-test test