上面是与生命周期有关的内容,下面是属性赋值相关的: @Configuration public class ProperTyValueConfig { @Bean public Person person() { return new Person(); } } 测试: public class test { private void printBeans(AnnotationConfigApplicationContext applicationContext) { String[] bean…
Spring Framework 5 1. Spring框架 1.1 Spring框架概述 1.2 主要内容 Spring框架是一个开源的JavaEE的应用程序 主要核心是 IOC(控制反转)和AOP(面向切面编程) 两大技术. 主要学习内容: Spring IOC (控制反转和依赖注入) Inversion of Control Spring AOP Aspect Oriented Programming Spring JDBC + 事务 2. Spring作用 Dao层: JDBC操作…