新增模块

master
xuchengsheng 2023-10-23 16:35:04 +08:00
parent c9562dfa55
commit de54f95f3b
16 changed files with 85 additions and 4 deletions

View File

@ -59,7 +59,9 @@
*探索 Spring 的核心部分,并理解其对象管理的高级策略。*
- [**深入理解IOC容器**](spring-core-ioc/README.md) - 探寻 Spring 如何实现控制反转,提供强大的依赖管理。
- [**getBean方法**](spring-core/spring-core-getBean/README.md) - 创建一个新的 bean 实例。
- [**resolveDependency方法**](spring-core/spring-core-resolveDependency/README.md) - 用于解析特定依赖的 bean。这通常在自动注入时使用。
- [**destroyBean方法**](spring-core/spring-core-destroyBean/README.md) - 销毁所有单例 bean。这通常在容器关闭时调用。
> ### 💡 后置处理器与初始化

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -18,11 +18,13 @@
</properties>
<modules>
<module>spring-core-ioc</module>
<module>spring-annotation</module>
<module>spring-aware</module>
<module>spring-interface</module>
<module>spring-jsr</module>
<module>spring-core</module>
<module>spring-aop</module>
<module>spring-mvc</module>
</modules>
<dependencies>

View File

@ -9,6 +9,6 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-core-ioc</artifactId>
<artifactId>spring-aop</artifactId>
</project>

21
spring-core/pom.xml Normal file
View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>spring-reading</artifactId>
<groupId>com.xcs.spring</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-core</artifactId>
<packaging>pom</packaging>
<modules>
<module>spring-core-resolveDependency</module>
<module>spring-core-getBean</module>
<module>spring-core-destroyBean</module>
</modules>
</project>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>spring-core</artifactId>
<groupId>com.xcs.spring</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-core-destroyBean</artifactId>
</project>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>spring-core</artifactId>
<groupId>com.xcs.spring</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-core-getBean</artifactId>
</project>

View File

@ -7,7 +7,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext
* @author xcs
* @date 20230916 1609
**/
public class IOCApplication {
public class GetBeanApplication {
public static void main(String[] args) {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MyConfiguration.class);

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>spring-core</artifactId>
<groupId>com.xcs.spring</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-core-resolveDependency</artifactId>
</project>

14
spring-mvc/pom.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>spring-reading</artifactId>
<groupId>com.xcs.spring</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-mvc</artifactId>
</project>