Spring纯注解开发上篇(包含Component、Configuration、ComponentScan、Scope、PostConstruct、PreDestroy注解)
注解开发定义bean顺序:" 1. 在所有需要放到容器中的类,在类上使用 @Component 注解 @Component("bookDao") public class BookDaoImpl implements BookDao {} @Component //如果没有指定id,则使用类名首字母小写做为id,即:bookServiceImpl public class BookServiceImpl implements BookService {.........