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容器启动初始化...");