diff --git a/handling-spring-static-resources/src/main/resources/webSecurityConfig.xml b/handling-spring-static-resources/src/main/resources/webSecurityConfig.xml deleted file mode 100644 index cf944804db..0000000000 --- a/handling-spring-static-resources/src/main/resources/webSecurityConfig.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/handling-spring-static-resources/src/main/webapp/WEB-INF/mvc-servlet.xml b/handling-spring-static-resources/src/main/webapp/WEB-INF/mvc-servlet.xml deleted file mode 100644 index 94bd63e068..0000000000 --- a/handling-spring-static-resources/src/main/webapp/WEB-INF/mvc-servlet.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 31bf977b95..f823acfa6a 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ guava-modules/guava-21 guice disruptor - handling-spring-static-resources + spring-static-resources hazelcast hbase diff --git a/handling-spring-static-resources/README.md b/spring-static-resources/README.md similarity index 100% rename from handling-spring-static-resources/README.md rename to spring-static-resources/README.md diff --git a/handling-spring-static-resources/pom.xml b/spring-static-resources/pom.xml similarity index 92% rename from handling-spring-static-resources/pom.xml rename to spring-static-resources/pom.xml index 771b37fb52..a00d03d2a1 100644 --- a/handling-spring-static-resources/pom.xml +++ b/spring-static-resources/pom.xml @@ -10,9 +10,9 @@ com.baeldung - parent-spring-4 + parent-spring-5 0.0.1-SNAPSHOT - ../parent-spring-4 + ../parent-spring-5 @@ -174,7 +174,9 @@ - maven-war-plugin + org.apache.maven.plugins + maven-war-plugin + 3.2.2 @@ -190,20 +192,20 @@ 1.8 - 4.2.6.RELEASE + 5.0.6.RELEASE 1.8.9 2.3.2-b02 - 2.8.5 + 2.9.6 - 5.3.3.Final - 4.0.6 - 2.9.6 + 6.0.10.Final + 4.1.0 + 2.10 1.2 - 3.1.0 + 4.0.1 1 diff --git a/handling-spring-static-resources/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java b/spring-static-resources/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java similarity index 100% rename from handling-spring-static-resources/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java rename to spring-static-resources/src/main/java/org/baeldung/security/MySimpleUrlAuthenticationSuccessHandler.java diff --git a/handling-spring-static-resources/src/main/java/org/baeldung/spring/AppConfig.java b/spring-static-resources/src/main/java/org/baeldung/spring/AppConfig.java similarity index 100% rename from handling-spring-static-resources/src/main/java/org/baeldung/spring/AppConfig.java rename to spring-static-resources/src/main/java/org/baeldung/spring/AppConfig.java diff --git a/handling-spring-static-resources/src/main/java/org/baeldung/spring/MvcConfig.java b/spring-static-resources/src/main/java/org/baeldung/spring/MvcConfig.java similarity index 97% rename from handling-spring-static-resources/src/main/java/org/baeldung/spring/MvcConfig.java rename to spring-static-resources/src/main/java/org/baeldung/spring/MvcConfig.java index 4a198cf195..dbc548e028 100644 --- a/handling-spring-static-resources/src/main/java/org/baeldung/spring/MvcConfig.java +++ b/spring-static-resources/src/main/java/org/baeldung/spring/MvcConfig.java @@ -15,7 +15,7 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.i18n.CookieLocaleResolver; import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; import org.springframework.web.servlet.resource.GzipResourceResolver; @@ -27,7 +27,7 @@ import org.springframework.web.servlet.view.JstlView; @Configuration @ComponentScan(basePackages = { "org.baeldung.web.controller", "org.baeldung.persistence.service", "org.baeldung.persistence.dao" }) @EnableWebMvc -public class MvcConfig extends WebMvcConfigurerAdapter { +public class MvcConfig implements WebMvcConfigurer { @Autowired Environment env; @@ -39,7 +39,6 @@ public class MvcConfig extends WebMvcConfigurerAdapter { @Override public void addViewControllers(final ViewControllerRegistry registry) { - super.addViewControllers(registry); registry.addViewController("/login.html"); registry.addViewController("/home.html"); diff --git a/handling-spring-static-resources/src/main/java/org/baeldung/spring/SecSecurityConfig.java b/spring-static-resources/src/main/java/org/baeldung/spring/SecSecurityConfig.java similarity index 100% rename from handling-spring-static-resources/src/main/java/org/baeldung/spring/SecSecurityConfig.java rename to spring-static-resources/src/main/java/org/baeldung/spring/SecSecurityConfig.java diff --git a/handling-spring-static-resources/src/main/java/org/baeldung/web/controller/HomeController.java b/spring-static-resources/src/main/java/org/baeldung/web/controller/HomeController.java similarity index 100% rename from handling-spring-static-resources/src/main/java/org/baeldung/web/controller/HomeController.java rename to spring-static-resources/src/main/java/org/baeldung/web/controller/HomeController.java diff --git a/handling-spring-static-resources/src/main/resources/application.properties b/spring-static-resources/src/main/resources/application.properties similarity index 100% rename from handling-spring-static-resources/src/main/resources/application.properties rename to spring-static-resources/src/main/resources/application.properties diff --git a/handling-spring-static-resources/src/main/resources/logback.xml b/spring-static-resources/src/main/resources/logback.xml similarity index 100% rename from handling-spring-static-resources/src/main/resources/logback.xml rename to spring-static-resources/src/main/resources/logback.xml diff --git a/handling-spring-static-resources/src/main/resources/messages_en.properties b/spring-static-resources/src/main/resources/messages_en.properties similarity index 100% rename from handling-spring-static-resources/src/main/resources/messages_en.properties rename to spring-static-resources/src/main/resources/messages_en.properties diff --git a/handling-spring-static-resources/src/main/resources/messages_es_ES.properties b/spring-static-resources/src/main/resources/messages_es_ES.properties similarity index 100% rename from handling-spring-static-resources/src/main/resources/messages_es_ES.properties rename to spring-static-resources/src/main/resources/messages_es_ES.properties diff --git a/spring-static-resources/src/main/resources/webSecurityConfig.xml b/spring-static-resources/src/main/resources/webSecurityConfig.xml new file mode 100644 index 0000000000..ea64ad5aea --- /dev/null +++ b/spring-static-resources/src/main/resources/webSecurityConfig.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/handling-spring-static-resources/src/main/webapp/WEB-INF/classes/other-resources/Hello.html b/spring-static-resources/src/main/webapp/WEB-INF/classes/other-resources/Hello.html similarity index 100% rename from handling-spring-static-resources/src/main/webapp/WEB-INF/classes/other-resources/Hello.html rename to spring-static-resources/src/main/webapp/WEB-INF/classes/other-resources/Hello.html diff --git a/handling-spring-static-resources/src/main/webapp/WEB-INF/classes/other-resources/bootstrap.css b/spring-static-resources/src/main/webapp/WEB-INF/classes/other-resources/bootstrap.css similarity index 100% rename from handling-spring-static-resources/src/main/webapp/WEB-INF/classes/other-resources/bootstrap.css rename to spring-static-resources/src/main/webapp/WEB-INF/classes/other-resources/bootstrap.css diff --git a/spring-static-resources/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-static-resources/src/main/webapp/WEB-INF/mvc-servlet.xml new file mode 100644 index 0000000000..c046aa16a9 --- /dev/null +++ b/spring-static-resources/src/main/webapp/WEB-INF/mvc-servlet.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/handling-spring-static-resources/src/main/webapp/WEB-INF/view/home.jsp b/spring-static-resources/src/main/webapp/WEB-INF/view/home.jsp similarity index 100% rename from handling-spring-static-resources/src/main/webapp/WEB-INF/view/home.jsp rename to spring-static-resources/src/main/webapp/WEB-INF/view/home.jsp diff --git a/handling-spring-static-resources/src/main/webapp/WEB-INF/view/login.jsp b/spring-static-resources/src/main/webapp/WEB-INF/view/login.jsp similarity index 100% rename from handling-spring-static-resources/src/main/webapp/WEB-INF/view/login.jsp rename to spring-static-resources/src/main/webapp/WEB-INF/view/login.jsp diff --git a/handling-spring-static-resources/src/main/webapp/WEB-INF/web.xml b/spring-static-resources/src/main/webapp/WEB-INF/web.xml similarity index 97% rename from handling-spring-static-resources/src/main/webapp/WEB-INF/web.xml rename to spring-static-resources/src/main/webapp/WEB-INF/web.xml index e9d784e940..4bb60e4f2c 100644 --- a/handling-spring-static-resources/src/main/webapp/WEB-INF/web.xml +++ b/spring-static-resources/src/main/webapp/WEB-INF/web.xml @@ -1,6 +1,6 @@ - diff --git a/handling-spring-static-resources/src/main/webapp/js/bootstrap.css b/spring-static-resources/src/main/webapp/js/bootstrap.css similarity index 100% rename from handling-spring-static-resources/src/main/webapp/js/bootstrap.css rename to spring-static-resources/src/main/webapp/js/bootstrap.css diff --git a/handling-spring-static-resources/src/main/webapp/js/foo.js b/spring-static-resources/src/main/webapp/js/foo.js similarity index 100% rename from handling-spring-static-resources/src/main/webapp/js/foo.js rename to spring-static-resources/src/main/webapp/js/foo.js diff --git a/handling-spring-static-resources/src/main/webapp/js/handlebars-3133af2.js b/spring-static-resources/src/main/webapp/js/handlebars-3133af2.js similarity index 100% rename from handling-spring-static-resources/src/main/webapp/js/handlebars-3133af2.js rename to spring-static-resources/src/main/webapp/js/handlebars-3133af2.js diff --git a/handling-spring-static-resources/src/main/webapp/js/helpers/utils.js b/spring-static-resources/src/main/webapp/js/helpers/utils.js similarity index 100% rename from handling-spring-static-resources/src/main/webapp/js/helpers/utils.js rename to spring-static-resources/src/main/webapp/js/helpers/utils.js diff --git a/handling-spring-static-resources/src/main/webapp/js/jquery-1.11.1.min.js b/spring-static-resources/src/main/webapp/js/jquery-1.11.1.min.js similarity index 100% rename from handling-spring-static-resources/src/main/webapp/js/jquery-1.11.1.min.js rename to spring-static-resources/src/main/webapp/js/jquery-1.11.1.min.js diff --git a/handling-spring-static-resources/src/main/webapp/js/main.js b/spring-static-resources/src/main/webapp/js/main.js similarity index 100% rename from handling-spring-static-resources/src/main/webapp/js/main.js rename to spring-static-resources/src/main/webapp/js/main.js diff --git a/handling-spring-static-resources/src/main/webapp/js/require.gz b/spring-static-resources/src/main/webapp/js/require.gz similarity index 100% rename from handling-spring-static-resources/src/main/webapp/js/require.gz rename to spring-static-resources/src/main/webapp/js/require.gz diff --git a/handling-spring-static-resources/src/main/webapp/js/require.js b/spring-static-resources/src/main/webapp/js/require.js similarity index 100% rename from handling-spring-static-resources/src/main/webapp/js/require.js rename to spring-static-resources/src/main/webapp/js/require.js diff --git a/handling-spring-static-resources/src/main/webapp/js/router.js b/spring-static-resources/src/main/webapp/js/router.js similarity index 100% rename from handling-spring-static-resources/src/main/webapp/js/router.js rename to spring-static-resources/src/main/webapp/js/router.js diff --git a/handling-spring-static-resources/src/main/webapp/other-resources/Hello.html b/spring-static-resources/src/main/webapp/other-resources/Hello.html similarity index 100% rename from handling-spring-static-resources/src/main/webapp/other-resources/Hello.html rename to spring-static-resources/src/main/webapp/other-resources/Hello.html diff --git a/handling-spring-static-resources/src/main/webapp/other-resources/bootstrap.css b/spring-static-resources/src/main/webapp/other-resources/bootstrap.css similarity index 100% rename from handling-spring-static-resources/src/main/webapp/other-resources/bootstrap.css rename to spring-static-resources/src/main/webapp/other-resources/bootstrap.css diff --git a/handling-spring-static-resources/src/main/webapp/other-resources/foo.js b/spring-static-resources/src/main/webapp/other-resources/foo.js similarity index 100% rename from handling-spring-static-resources/src/main/webapp/other-resources/foo.js rename to spring-static-resources/src/main/webapp/other-resources/foo.js diff --git a/handling-spring-static-resources/src/main/webapp/resources/bootstrap.css b/spring-static-resources/src/main/webapp/resources/bootstrap.css similarity index 100% rename from handling-spring-static-resources/src/main/webapp/resources/bootstrap.css rename to spring-static-resources/src/main/webapp/resources/bootstrap.css diff --git a/handling-spring-static-resources/src/main/webapp/resources/myCss.css b/spring-static-resources/src/main/webapp/resources/myCss.css similarity index 100% rename from handling-spring-static-resources/src/main/webapp/resources/myCss.css rename to spring-static-resources/src/main/webapp/resources/myCss.css