Springboot @Autowired用法
摘要:2. @Autowired 作用:@Autowired表示被修饰的类需要注入对象,spring会扫描所有被@Autowired标注的类,然后根据 类型在ioc容器中找到匹配的类注入。 @Autowired public class Car(Brand benz) { this.brand=benz;
阅读全文
posted @
2019-07-26 18:21
LittleSpring
阅读(6815)
推荐(0)
mybatis
摘要:MyBatis 本是apache的一个开源项目iBatis, 2010年这个项目由apache software foundation 迁移到了google code,并且改名为MyBatis。是一个基于Java的持久层框架 ORM框架 都是对JDBC的一种封装! Objet Relation Ma
阅读全文
posted @
2019-07-23 18:12
LittleSpring
阅读(131)
推荐(0)
springboot
摘要:@ComponentScan注解是什么 https://blog.51cto.com/4247649/2118342 @ComponentScan注解默认就会装配标识了@Controller,@Service,@Repository,@Component注解的类到spring容器中 总结一下@Com
阅读全文
posted @
2019-07-23 15:13
LittleSpring
阅读(197)
推荐(0)