1.beans package com.atguigu.bean; public class Blue { public Blue(){ System.out.println("blue...constructor"); } public void init(){ System.out.println("blue...init..."); } public void detory(){ System.out.println("blue...detory..…
1.@Configuration标注在类上,相当于把该类作为spring的xml配置文件中的<beans>,作用为:配置spring容器(应用上下文) package com.test.spring.support.configuration; @Configuration public class TestConfiguration { public TestConfiguration(){ System.out.println("spring容器启动初始化...");…
1.@Configuration标注在类上,相当于把该类作为spring的xml配置文件中的<beans>,作用为:配置spring容器(应用上下文) package com.test.spring.support.configuration; @Configuration public class TestConfiguration { public TestConfiguration(){ System.out.println("spring容器启动初始化...");…