diff --git a/README.md b/README.md index b77b896..93a8016 100644 --- a/README.md +++ b/README.md @@ -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。这通常在容器关闭时调用。 > ### 💡 后置处理器与初始化 diff --git a/banner.png b/banner.png index 5fd4088..e190e38 100644 Binary files a/banner.png and b/banner.png differ diff --git a/pom.xml b/pom.xml index 2798c3d..14cd2f6 100644 --- a/pom.xml +++ b/pom.xml @@ -18,11 +18,13 @@ - spring-core-ioc spring-annotation spring-aware spring-interface spring-jsr + spring-core + spring-aop + spring-mvc diff --git a/spring-core-ioc/pom.xml b/spring-aop/pom.xml similarity index 89% rename from spring-core-ioc/pom.xml rename to spring-aop/pom.xml index 882c071..8e5ad5a 100644 --- a/spring-core-ioc/pom.xml +++ b/spring-aop/pom.xml @@ -9,6 +9,6 @@ 4.0.0 - spring-core-ioc + spring-aop \ No newline at end of file diff --git a/spring-core/pom.xml b/spring-core/pom.xml new file mode 100644 index 0000000..1a113d6 --- /dev/null +++ b/spring-core/pom.xml @@ -0,0 +1,21 @@ + + + + spring-reading + com.xcs.spring + 0.0.1-SNAPSHOT + + + 4.0.0 + spring-core + pom + + + spring-core-resolveDependency + spring-core-getBean + spring-core-destroyBean + + + \ No newline at end of file diff --git a/spring-core/spring-core-destroyBean/README.md b/spring-core/spring-core-destroyBean/README.md new file mode 100644 index 0000000..e69de29 diff --git a/spring-core/spring-core-destroyBean/pom.xml b/spring-core/spring-core-destroyBean/pom.xml new file mode 100644 index 0000000..cfaa072 --- /dev/null +++ b/spring-core/spring-core-destroyBean/pom.xml @@ -0,0 +1,14 @@ + + + + spring-core + com.xcs.spring + 0.0.1-SNAPSHOT + + + 4.0.0 + spring-core-destroyBean + + \ No newline at end of file diff --git a/spring-core-ioc/README.md b/spring-core/spring-core-getBean/README.md similarity index 100% rename from spring-core-ioc/README.md rename to spring-core/spring-core-getBean/README.md diff --git a/spring-core/spring-core-getBean/pom.xml b/spring-core/spring-core-getBean/pom.xml new file mode 100644 index 0000000..dbe38a3 --- /dev/null +++ b/spring-core/spring-core-getBean/pom.xml @@ -0,0 +1,14 @@ + + + + spring-core + com.xcs.spring + 0.0.1-SNAPSHOT + + + 4.0.0 + spring-core-getBean + + \ No newline at end of file diff --git a/spring-core-ioc/src/main/java/com/xcs/spring/IOCApplication.java b/spring-core/spring-core-getBean/src/main/java/com/xcs/spring/GetBeanApplication.java similarity index 94% rename from spring-core-ioc/src/main/java/com/xcs/spring/IOCApplication.java rename to spring-core/spring-core-getBean/src/main/java/com/xcs/spring/GetBeanApplication.java index 9d276c7..83d526b 100644 --- a/spring-core-ioc/src/main/java/com/xcs/spring/IOCApplication.java +++ b/spring-core/spring-core-getBean/src/main/java/com/xcs/spring/GetBeanApplication.java @@ -7,7 +7,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext * @author xcs * @date 2023年09月16日 16时09分 **/ -public class IOCApplication { +public class GetBeanApplication { public static void main(String[] args) { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MyConfiguration.class); diff --git a/spring-core-ioc/src/main/java/com/xcs/spring/config/MyConfiguration.java b/spring-core/spring-core-getBean/src/main/java/com/xcs/spring/config/MyConfiguration.java similarity index 100% rename from spring-core-ioc/src/main/java/com/xcs/spring/config/MyConfiguration.java rename to spring-core/spring-core-getBean/src/main/java/com/xcs/spring/config/MyConfiguration.java diff --git a/spring-core-ioc/src/main/java/com/xcs/spring/service/MyServiceA.java b/spring-core/spring-core-getBean/src/main/java/com/xcs/spring/service/MyServiceA.java similarity index 100% rename from spring-core-ioc/src/main/java/com/xcs/spring/service/MyServiceA.java rename to spring-core/spring-core-getBean/src/main/java/com/xcs/spring/service/MyServiceA.java diff --git a/spring-core-ioc/src/main/java/com/xcs/spring/service/MyServiceB.java b/spring-core/spring-core-getBean/src/main/java/com/xcs/spring/service/MyServiceB.java similarity index 100% rename from spring-core-ioc/src/main/java/com/xcs/spring/service/MyServiceB.java rename to spring-core/spring-core-getBean/src/main/java/com/xcs/spring/service/MyServiceB.java diff --git a/spring-core/spring-core-resolveDependency/README.md b/spring-core/spring-core-resolveDependency/README.md new file mode 100644 index 0000000..e69de29 diff --git a/spring-core/spring-core-resolveDependency/pom.xml b/spring-core/spring-core-resolveDependency/pom.xml new file mode 100644 index 0000000..68dd904 --- /dev/null +++ b/spring-core/spring-core-resolveDependency/pom.xml @@ -0,0 +1,14 @@ + + + + spring-core + com.xcs.spring + 0.0.1-SNAPSHOT + + + 4.0.0 + spring-core-resolveDependency + + \ No newline at end of file diff --git a/spring-mvc/pom.xml b/spring-mvc/pom.xml new file mode 100644 index 0000000..8851920 --- /dev/null +++ b/spring-mvc/pom.xml @@ -0,0 +1,14 @@ + + + + spring-reading + com.xcs.spring + 0.0.1-SNAPSHOT + + + 4.0.0 + spring-mvc + + \ No newline at end of file