2019年9月17日

Using Spring Boot —— Using the @SpringBootApplication Annotation

摘要: 注解@SpringBootApplication相当于下面三个注解: @EnableAutoConfiguration 自动配置 @ComponentScan 扫描指定包下的所有@Component @Configuration 允许注册@Bean / 导入Configuration类(@Impor 阅读全文

posted @ 2019-09-17 10:24 李笑白 阅读(98) 评论(0) 推荐(0) 编辑

Using Spring Boot —— Spring Beans and Dependency Injection

摘要: Spring Beans @ComponentScan 扫描指定包下的@Component @Controller @Service @Respository类 @Autowired 自动注入bean,可以在属性/构造方法/set方法上使用 阅读全文

posted @ 2019-09-17 10:12 李笑白 阅读(108) 评论(0) 推荐(0) 编辑

导航