@Configuration
标记到一个类上,说明这个类是一个配置类,相当于一个spring配置文件
@ComponentScan
扫描包注解 作用:自动扫描 指定的 包 下的 标注有 @Repository @Service @Controller
@Bean
放在方法上 相当于<bean></bean> 该方法的返回值类型为该Bean的类型
@Value
获取properties文件指定的key的 value值
@Configuration
标记到一个类上,说明这个类是一个配置类,相当于一个spring配置文件
@ComponentScan
扫描包注解 作用:自动扫描 指定的 包 下的 标注有 @Repository @Service @Controller
@Bean
放在方法上 相当于<bean></bean> 该方法的返回值类型为该Bean的类型
@Value
获取properties文件指定的key的 value值