@Configuration注解源码分析

master
xuchengsheng 2023-10-07 18:02:16 +08:00
parent 7a221dfc23
commit d5fe4cf858
5 changed files with 1399 additions and 1304 deletions

View File

@ -62,9 +62,9 @@
+ [关于ApplicationContextAware源码分析](spring-aware-applicationContextAware/README.md)
+ [关于ImportAware源码分析](spring-aware-importAware/README.md)
+ 核心注解
+ [关于@Bean源码分析](spring-annotation-bean/README.md)
+ [关于@ComponentScan源码分析](spring-annotation-componentScan/README.md)
+ [关于@Configuration源码分析](spring-annotation-configuration/README.md)
+ [关于@ComponentScan源码分析](spring-annotation-componentScan/README.md)
+ [关于@Bean源码分析](spring-annotation-bean/README.md)
+ [关于@Import源码分析](spring-annotation-import/README.md)
+ [关于@PropertySource源码分析](spring-annotation-propertySource/README.md)
+ Bean工厂

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,8 @@
package com.xcs.spring;
import com.xcs.spring.config.MyConfiguration;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import java.io.IOException;
/**
* @author xcs
* @date 20230807 1621
@ -16,13 +15,5 @@ public class ConfigurationApplication {
System.out.println(configuration.myBean());
System.out.println(configuration.myBean());
System.out.println("MyConfiguration = " + configuration.getClass().getName());
try {
System.in.read();
} catch (IOException e) {
e.printStackTrace();
}
}
}

View File

@ -1,4 +1,4 @@
package com.xcs.spring;
package com.xcs.spring.config;
import com.xcs.spring.bean.MyBean;
import org.springframework.context.annotation.Bean;