| 注解 | 描述 | 备注 |
|---|---|---|
| @Bean | @Bean 相当于使用spring xml 配置时,在xml中定义一个Bean组件,该@Bean定义的方法必须在@Configuration注解的类才能生效 | |
| @PostConstruct | ||
| @ConfigurationProperties | 加载yaml文件,使用位置:类、接口(包括注释类型)或枚举 | @ConfigurationProperties(prefix = “person”) // perfix 对应配置文件前缀 |
| @PropertySource | 加载properties文件 |
