diff --git a/pom.xml b/pom.xml index b21d656772..1a11bd055f 100644 --- a/pom.xml +++ b/pom.xml @@ -153,7 +153,6 @@ spring-mvc-email spring-mvc-forms spring-mvc-java - spring-mvc-no-xml spring-mvc-tiles spring-mvc-velocity spring-mvc-web-vs-initializer diff --git a/spring-mvc-no-xml/.gitignore b/spring-mvc-no-xml/.gitignore deleted file mode 100644 index 83c05e60c8..0000000000 --- a/spring-mvc-no-xml/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -*.class - -#folders# -/target -/neoDb* -/data -/src/main/webapp/WEB-INF/classes -*/META-INF/* - -# Packaged files # -*.jar -*.war -*.ear \ No newline at end of file diff --git a/spring-mvc-no-xml/README.md b/spring-mvc-no-xml/README.md deleted file mode 100644 index 208cb35f78..0000000000 --- a/spring-mvc-no-xml/README.md +++ /dev/null @@ -1,9 +0,0 @@ -========= - -## Spring MVC with NO XML Configuration Example Project - -###The Course -The "REST With Spring" Classes: http://bit.ly/restwithspring - -### Relevant Articles: -- diff --git a/spring-mvc-no-xml/pom.xml b/spring-mvc-no-xml/pom.xml deleted file mode 100644 index 4437661199..0000000000 --- a/spring-mvc-no-xml/pom.xml +++ /dev/null @@ -1,175 +0,0 @@ - - 4.0.0 - com.baeldung - 0.1-SNAPSHOT - spring-mvc-no-xml - - spring-mvc-no-xml - war - - - - - - - org.springframework - spring-web - ${org.springframework.version} - - - org.springframework - spring-webmvc - ${org.springframework.version} - - - - - - javax.servlet - javax.servlet-api - ${javax.servlet-api.version} - provided - - - - javax.servlet - jstl - ${jstl.version} - runtime - - - - - - org.slf4j - slf4j-api - ${org.slf4j.version} - - - ch.qos.logback - logback-classic - ${logback.version} - - - - org.slf4j - jcl-over-slf4j - ${org.slf4j.version} - - - - org.slf4j - log4j-over-slf4j - ${org.slf4j.version} - - - - - - junit - junit - ${junit.version} - test - - - - org.hamcrest - hamcrest-core - ${org.hamcrest.version} - test - - - org.hamcrest - hamcrest-library - ${org.hamcrest.version} - test - - - - org.mockito - mockito-core - ${mockito.version} - test - - - - - - spring-mvc-no-xml - - - src/main/resources - true - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - 1.8 - 1.8 - - - - - org.apache.maven.plugins - maven-war-plugin - ${maven-war-plugin.version} - - false - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - - - - - - - - - - - - - - - 4.3.4.RELEASE - - - 1.7.21 - 1.1.7 - - - 1.3 - 4.12 - 1.10.19 - - 3.1.0 - 1.2 - - 4.4.5 - 4.5.2 - - 2.9.0 - - - 3.6.0 - 2.6 - 2.19.1 - 2.7 - 1.6.1 - - - - \ No newline at end of file diff --git a/spring-mvc-no-xml/src/main/java/org/baeldung/servlet/WebAppNew.java b/spring-mvc-no-xml/src/main/java/org/baeldung/servlet/WebAppNew.java deleted file mode 100644 index 2422f2110a..0000000000 --- a/spring-mvc-no-xml/src/main/java/org/baeldung/servlet/WebAppNew.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.baeldung.servlet; - -import javax.servlet.ServletRegistration.Dynamic; - -import org.baeldung.spring.ClientWebConfig; -import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; - -/** - * Further reading:
- * - http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/mvc.html#mvc-container-config
- * - http://geowarin.wordpress.com/2013/01/23/complete-example-of-a-spring-mvc-3-2-project/
- * - http://www.objectpartners.com/2012/01/16/introduction-to-servlet-3-0/
- */ -public class WebAppNew extends AbstractAnnotationConfigDispatcherServletInitializer { - - public WebAppNew() { - super(); - } - - // API - - @Override - protected Class[] getRootConfigClasses() { - return null; - } - - @Override - protected Class[] getServletConfigClasses() { - return new Class[] { ClientWebConfig.class }; - } - - @Override - protected String[] getServletMappings() { - return new String[] { "/" }; - } - - @Override - protected void customizeRegistration(final Dynamic registration) { - super.customizeRegistration(registration); - } - -} diff --git a/spring-mvc-no-xml/src/main/java/org/baeldung/servlet/WebAppOld.java b/spring-mvc-no-xml/src/main/java/org/baeldung/servlet/WebAppOld.java deleted file mode 100644 index 85c67c094d..0000000000 --- a/spring-mvc-no-xml/src/main/java/org/baeldung/servlet/WebAppOld.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.baeldung.servlet; - -// public class WebApp implements WebApplicationInitializer { -// -// public WebApp() { -// super(); -// } -// -// // API -// -// @Override -// public void onStartup(final ServletContext servletContext) throws ServletException { -// final AnnotationConfigWebApplicationContext root = new AnnotationConfigWebApplicationContext(); -// root.setServletContext(servletContext); -// root.scan("org.baeldung.spring"); -// root.refresh(); -// -// final Dynamic servlet = servletContext.addServlet("mvc", new DispatcherServlet(root)); -// servlet.setLoadOnStartup(1); -// servlet.addMapping("/"); -// } -// -// } diff --git a/spring-mvc-no-xml/src/main/java/org/baeldung/spring/ClientWebConfig.java b/spring-mvc-no-xml/src/main/java/org/baeldung/spring/ClientWebConfig.java deleted file mode 100644 index eaefb0984b..0000000000 --- a/spring-mvc-no-xml/src/main/java/org/baeldung/spring/ClientWebConfig.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.baeldung.spring; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.ViewResolver; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; -import org.springframework.web.servlet.view.InternalResourceViewResolver; -import org.springframework.web.servlet.view.JstlView; - -@EnableWebMvc -@Configuration -public class ClientWebConfig extends WebMvcConfigurerAdapter { - - public ClientWebConfig() { - super(); - } - - // API - - @Override - public void addViewControllers(final ViewControllerRegistry registry) { - super.addViewControllers(registry); - - registry.addViewController("/sample.html"); - } - - @Bean - public ViewResolver viewResolver() { - final InternalResourceViewResolver bean = new InternalResourceViewResolver(); - - bean.setViewClass(JstlView.class); - bean.setPrefix("/WEB-INF/view/"); - bean.setSuffix(".jsp"); - - return bean; - } -} \ No newline at end of file diff --git a/spring-mvc-no-xml/src/main/resources/logback.xml b/spring-mvc-no-xml/src/main/resources/logback.xml deleted file mode 100644 index 1146dade63..0000000000 --- a/spring-mvc-no-xml/src/main/resources/logback.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - web - %date [%thread] %-5level %logger{36} - %message%n - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-mvc-no-xml/src/main/resources/webSecurityConfig.xml b/spring-mvc-no-xml/src/main/resources/webSecurityConfig.xml deleted file mode 100644 index febac349b0..0000000000 --- a/spring-mvc-no-xml/src/main/resources/webSecurityConfig.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-mvc-no-xml/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-mvc-no-xml/src/main/webapp/WEB-INF/mvc-servlet.xml deleted file mode 100644 index 4ba9642448..0000000000 --- a/spring-mvc-no-xml/src/main/webapp/WEB-INF/mvc-servlet.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/spring-mvc-no-xml/src/main/webapp/WEB-INF/view/sample.jsp b/spring-mvc-no-xml/src/main/webapp/WEB-INF/view/sample.jsp deleted file mode 100644 index 7cc14b5dcd..0000000000 --- a/spring-mvc-no-xml/src/main/webapp/WEB-INF/view/sample.jsp +++ /dev/null @@ -1,7 +0,0 @@ - - - - -

This is the body of the sample view

- - \ No newline at end of file diff --git a/spring-mvc-no-xml/src/main/webapp/WEB-INF/web_old.xml b/spring-mvc-no-xml/src/main/webapp/WEB-INF/web_old.xml deleted file mode 100644 index e2f52148c3..0000000000 --- a/spring-mvc-no-xml/src/main/webapp/WEB-INF/web_old.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - Spring MVC No XML Application - - - - contextClass - - org.springframework.web.context.support.AnnotationConfigWebApplicationContext - - - - contextConfigLocation - org.baeldung.spring - - - - org.springframework.web.context.ContextLoaderListener - - - - - mvc - org.springframework.web.servlet.DispatcherServlet - 1 - - - mvc - / - - - - - - index.html - - - \ No newline at end of file diff --git a/spring-mvc-no-xml/src/test/resources/.gitignore b/spring-mvc-no-xml/src/test/resources/.gitignore deleted file mode 100644 index 83c05e60c8..0000000000 --- a/spring-mvc-no-xml/src/test/resources/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -*.class - -#folders# -/target -/neoDb* -/data -/src/main/webapp/WEB-INF/classes -*/META-INF/* - -# Packaged files # -*.jar -*.war -*.ear \ No newline at end of file