diff --git a/dependency-injection/.gitignore b/spring-core/.gitignore similarity index 100% rename from dependency-injection/.gitignore rename to spring-core/.gitignore diff --git a/dependency-injection/README.md b/spring-core/README.md similarity index 100% rename from dependency-injection/README.md rename to spring-core/README.md diff --git a/dependency-injection/pom.xml b/spring-core/pom.xml similarity index 100% rename from dependency-injection/pom.xml rename to spring-core/pom.xml diff --git a/dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestAutowiredName.java b/spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestAutowiredName.java similarity index 100% rename from dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestAutowiredName.java rename to spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestAutowiredName.java diff --git a/dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestAutowiredQualifier.java b/spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestAutowiredQualifier.java similarity index 100% rename from dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestAutowiredQualifier.java rename to spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestAutowiredQualifier.java diff --git a/dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestAutowiredType.java b/spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestAutowiredType.java similarity index 100% rename from dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestAutowiredType.java rename to spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestAutowiredType.java diff --git a/dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestInjectName.java b/spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestInjectName.java similarity index 100% rename from dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestInjectName.java rename to spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestInjectName.java diff --git a/dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestInjectQualifier.java b/spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestInjectQualifier.java similarity index 100% rename from dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestInjectQualifier.java rename to spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestInjectQualifier.java diff --git a/dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestInjectType.java b/spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestInjectType.java similarity index 100% rename from dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestInjectType.java rename to spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestInjectType.java diff --git a/dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestResourceNameType.java b/spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestResourceNameType.java similarity index 100% rename from dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestResourceNameType.java rename to spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestResourceNameType.java diff --git a/dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestResourceQualifier.java b/spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestResourceQualifier.java similarity index 100% rename from dependency-injection/src/main/java/com/baeldung/configuration/ApplicationContextTestResourceQualifier.java rename to spring-core/src/main/java/com/baeldung/configuration/ApplicationContextTestResourceQualifier.java diff --git a/dependency-injection/src/main/java/com/baeldung/dependency/AnotherArbitraryDependency.java b/spring-core/src/main/java/com/baeldung/dependency/AnotherArbitraryDependency.java similarity index 100% rename from dependency-injection/src/main/java/com/baeldung/dependency/AnotherArbitraryDependency.java rename to spring-core/src/main/java/com/baeldung/dependency/AnotherArbitraryDependency.java diff --git a/dependency-injection/src/main/java/com/baeldung/dependency/ArbitraryDependency.java b/spring-core/src/main/java/com/baeldung/dependency/ArbitraryDependency.java similarity index 100% rename from dependency-injection/src/main/java/com/baeldung/dependency/ArbitraryDependency.java rename to spring-core/src/main/java/com/baeldung/dependency/ArbitraryDependency.java diff --git a/dependency-injection/src/main/java/com/baeldung/dependency/YetAnotherArbitraryDependency.java b/spring-core/src/main/java/com/baeldung/dependency/YetAnotherArbitraryDependency.java similarity index 100% rename from dependency-injection/src/main/java/com/baeldung/dependency/YetAnotherArbitraryDependency.java rename to spring-core/src/main/java/com/baeldung/dependency/YetAnotherArbitraryDependency.java diff --git a/dependency-injection/src/test/java/com/baeldung/autowired/FieldAutowiredIntegrationTest.java b/spring-core/src/test/java/com/baeldung/autowired/FieldAutowiredIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/autowired/FieldAutowiredIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/autowired/FieldAutowiredIntegrationTest.java diff --git a/dependency-injection/src/test/java/com/baeldung/autowired/FieldAutowiredNameIntegrationTest.java b/spring-core/src/test/java/com/baeldung/autowired/FieldAutowiredNameIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/autowired/FieldAutowiredNameIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/autowired/FieldAutowiredNameIntegrationTest.java diff --git a/dependency-injection/src/test/java/com/baeldung/autowired/FieldQualifierAutowiredIntegrationTest.java b/spring-core/src/test/java/com/baeldung/autowired/FieldQualifierAutowiredIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/autowired/FieldQualifierAutowiredIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/autowired/FieldQualifierAutowiredIntegrationTest.java diff --git a/dependency-injection/src/test/java/com/baeldung/inject/FieldByNameInjectIntegrationTest.java b/spring-core/src/test/java/com/baeldung/inject/FieldByNameInjectIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/inject/FieldByNameInjectIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/inject/FieldByNameInjectIntegrationTest.java diff --git a/dependency-injection/src/test/java/com/baeldung/inject/FieldInjectIntegrationTest.java b/spring-core/src/test/java/com/baeldung/inject/FieldInjectIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/inject/FieldInjectIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/inject/FieldInjectIntegrationTest.java diff --git a/dependency-injection/src/test/java/com/baeldung/inject/FieldQualifierInjectIntegrationTest.java b/spring-core/src/test/java/com/baeldung/inject/FieldQualifierInjectIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/inject/FieldQualifierInjectIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/inject/FieldQualifierInjectIntegrationTest.java diff --git a/dependency-injection/src/test/java/com/baeldung/resource/FieldResourceInjectionIntegrationTest.java b/spring-core/src/test/java/com/baeldung/resource/FieldResourceInjectionIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/resource/FieldResourceInjectionIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/resource/FieldResourceInjectionIntegrationTest.java diff --git a/dependency-injection/src/test/java/com/baeldung/resource/MethodByQualifierResourceIntegrationTest.java b/spring-core/src/test/java/com/baeldung/resource/MethodByQualifierResourceIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/resource/MethodByQualifierResourceIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/resource/MethodByQualifierResourceIntegrationTest.java diff --git a/dependency-injection/src/test/java/com/baeldung/resource/MethodByTypeResourceIntegrationTest.java b/spring-core/src/test/java/com/baeldung/resource/MethodByTypeResourceIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/resource/MethodByTypeResourceIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/resource/MethodByTypeResourceIntegrationTest.java diff --git a/dependency-injection/src/test/java/com/baeldung/resource/MethodResourceInjectionIntegrationTest.java b/spring-core/src/test/java/com/baeldung/resource/MethodResourceInjectionIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/resource/MethodResourceInjectionIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/resource/MethodResourceInjectionIntegrationTest.java diff --git a/dependency-injection/src/test/java/com/baeldung/resource/NamedResourceIntegrationTest.java b/spring-core/src/test/java/com/baeldung/resource/NamedResourceIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/resource/NamedResourceIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/resource/NamedResourceIntegrationTest.java diff --git a/dependency-injection/src/test/java/com/baeldung/resource/QualifierResourceInjectionIntegrationTest.java b/spring-core/src/test/java/com/baeldung/resource/QualifierResourceInjectionIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/resource/QualifierResourceInjectionIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/resource/QualifierResourceInjectionIntegrationTest.java diff --git a/dependency-injection/src/test/java/com/baeldung/resource/SetterResourceInjectionIntegrationTest.java b/spring-core/src/test/java/com/baeldung/resource/SetterResourceInjectionIntegrationTest.java similarity index 100% rename from dependency-injection/src/test/java/com/baeldung/resource/SetterResourceInjectionIntegrationTest.java rename to spring-core/src/test/java/com/baeldung/resource/SetterResourceInjectionIntegrationTest.java diff --git a/spring-mvc-java/src/main/java/com/baeldung/spring/web/config/MainWebAppInitializer.java b/spring-mvc-java/src/main/java/com/baeldung/spring/web/config/MainWebAppInitializer.java index f428fc3223..80ce22edd6 100644 --- a/spring-mvc-java/src/main/java/com/baeldung/spring/web/config/MainWebAppInitializer.java +++ b/spring-mvc-java/src/main/java/com/baeldung/spring/web/config/MainWebAppInitializer.java @@ -1,17 +1,16 @@ package com.baeldung.spring.web.config; -import java.util.Set; - -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.ServletRegistration; - import org.springframework.web.WebApplicationInitializer; import org.springframework.web.context.ContextLoaderListener; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.context.support.GenericWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.ServletRegistration; +import java.util.Set; + public class MainWebAppInitializer implements WebApplicationInitializer { private static final String TMP_FOLDER = "/tmp"; @@ -28,7 +27,6 @@ public class MainWebAppInitializer implements WebApplicationInitializer { root.scan("com.baeldung.spring.web.config"); // root.getEnvironment().setDefaultProfiles("embedded"); - // Manages the lifecycle of the root application context sc.addListener(new ContextLoaderListener(root)); // Handles requests into the application