diff --git a/spring-mvc-push/.gitignore b/spring-mvc-push/.gitignore deleted file mode 100644 index 448298d47f..0000000000 --- a/spring-mvc-push/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/.tern-project diff --git a/spring-mvc-push/pom.xml b/spring-mvc-push/pom.xml deleted file mode 100644 index 2eb10381be..0000000000 --- a/spring-mvc-push/pom.xml +++ /dev/null @@ -1,91 +0,0 @@ - - 4.0.0 - com.baeldung - spring-mvc-push - war - 0.0.1-SNAPSHOT - spring-mvc-push - - 1.8 - 1.8 - 2.20 - 3.7.0 - 3.2.0 - UTF-8 - 5.0.2 - 5.0.2.RELEASE - 4.0.0 - 1.2 - 2.3.2-b02 - 5.0.2 - 1.0.2 - - - - org.springframework - spring-webmvc - ${spring.version} - - - javax.servlet - javax.servlet-api - ${servlet.version} - provided - - - javax.servlet - jstl - ${jstl.version} - - - javax.servlet.jsp - javax.servlet.jsp-api - ${jsp-api.version} - - - - org.springframework - spring-test - ${spring.version} - test - - - org.junit.jupiter - junit-jupiter-engine - ${junit.jupiter.version} - test - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.version} - - - org.apache.maven.plugins - maven-war-plugin - ${maven-war-plugin.version} - - spring-mvc-push - false - ${deploy-path} - - - - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - org.junit.platform - junit-platform-surefire-provider - ${junit.platform.version} - - - - - spring-mvc-push - - diff --git a/spring-mvc-push/src/main/java/com/baeldung/config/PushConfiguration.java b/spring-mvc-push/src/main/java/com/baeldung/config/PushConfiguration.java deleted file mode 100644 index e6188da92d..0000000000 --- a/spring-mvc-push/src/main/java/com/baeldung/config/PushConfiguration.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.baeldung.config; - -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.ServletRegistration; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.WebApplicationInitializer; -import org.springframework.web.context.ContextLoaderListener; -import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; -import org.springframework.web.servlet.DispatcherServlet; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import org.springframework.web.servlet.view.InternalResourceViewResolver; - -@Configuration -@EnableWebMvc -@ComponentScan(basePackages = "com.baeldung.controller") -public class PushConfiguration implements WebApplicationInitializer, WebMvcConfigurer { - - @Override - public void onStartup(ServletContext container) throws ServletException { - AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext(); - context.register(PushConfiguration.class); - container.addListener(new ContextLoaderListener(context)); - ServletRegistration.Dynamic dispatcher = container.addServlet("DispatcherServlet", new DispatcherServlet(context)); - dispatcher.setLoadOnStartup(1); - dispatcher.addMapping("/"); - } - - @Bean - public InternalResourceViewResolver jspViewResolver() { - InternalResourceViewResolver bean = new InternalResourceViewResolver(); - bean.setPrefix("/WEB-INF/views/"); - bean.setSuffix(".jsp"); - return bean; - } - - @Override - public void addResourceHandlers(ResourceHandlerRegistry registry) { - registry.addResourceHandler("/resources/**") - .addResourceLocations("/resources/"); - } - -} diff --git a/spring-mvc-push/src/main/webapp/index.jsp b/spring-mvc-push/src/main/webapp/index.jsp deleted file mode 100644 index 82ecb68003..0000000000 --- a/spring-mvc-push/src/main/webapp/index.jsp +++ /dev/null @@ -1,14 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> - - - -PushBuilder demo - - -

- Go to PushBuilder demo
Go to - Simple demo -

- - \ No newline at end of file diff --git a/spring-mvc-push/src/main/webapp/resources/script.js b/spring-mvc-push/src/main/webapp/resources/script.js deleted file mode 100644 index 9bc97c006a..0000000000 --- a/spring-mvc-push/src/main/webapp/resources/script.js +++ /dev/null @@ -1 +0,0 @@ -console.log('Script') \ No newline at end of file diff --git a/spring-mvc-push/src/main/webapp/resources/style.css b/spring-mvc-push/src/main/webapp/resources/style.css deleted file mode 100644 index d5fc158135..0000000000 --- a/spring-mvc-push/src/main/webapp/resources/style.css +++ /dev/null @@ -1,9 +0,0 @@ -.single-title { - font-size: 30px; - color: #535353; - font-weight: 200; - letter-spacing: -1.5px; - line-height: 64px; - max-width: 750px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif -} \ No newline at end of file diff --git a/spring-mvc-simple/pom.xml b/spring-mvc-simple/pom.xml index 2cc6aec906..05b2eb49b6 100644 --- a/spring-mvc-simple/pom.xml +++ b/spring-mvc-simple/pom.xml @@ -8,83 +8,62 @@ Spring MVC simple Maven Webapp http://maven.apache.org - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - 4.3.10.RELEASE - 3.1.0 + 1.8 + 1.8 + UTF-8 + 5.0.2.RELEASE + 3.2.0 + 3.7.0 + 2.20 1.2 - 2.3.1 - 3.1.0 + 2.3.2-b02 + 4.0.0 5.4.1.Final enter-location-of-server 1.3.2 1.8 3.0.7.RELEASE 2.4.12 - 2.3.23 + 2.3.27-incubating 1.2.5 + 5.0.2 + 5.0.2 + 1.0.2 javax.servlet javax.servlet-api - 3.1.0 - - - org.springframework - spring-webmvc - ${springframework.version} - - - org.springframework - spring-context - ${springframework.version} - - - org.springframework - spring-core - ${springframework.version} - - - commons-logging - commons-logging - - + ${javax.servlet-api.version} javax.servlet.jsp javax.servlet.jsp-api ${javax.servlet.jsp-api.version} - javax.servlet jstl ${jstl.version} - org.hibernate hibernate-validator ${hibernate-validator.version} - - org.springframework - spring-webmvc - ${springframework.version} - commons-fileupload commons-fileupload ${fileupload.version} - + + org.springframework + spring-webmvc + ${springframework.version} + + org.thymeleaf @@ -115,7 +94,7 @@ groovy-templates ${groovy.version} - + de.neuland-bfi @@ -123,6 +102,19 @@ ${jade.version} + + + org.springframework + spring-test + ${springframework.version} + test + + + org.junit.jupiter + junit-jupiter-engine + ${junit.jupiter.version} + test + @@ -141,11 +133,18 @@ org.apache.maven.plugins maven-compiler-plugin - 3.7.0 - - 1.8 - 1.8 - + ${maven.compiler.version} + + + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + org.junit.platform + junit-platform-surefire-provider + ${junit.platform.version} + + diff --git a/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/ApplicationConfiguration.java b/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/ApplicationConfiguration.java index b62ccae465..b9a8336bf2 100644 --- a/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/ApplicationConfiguration.java +++ b/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/ApplicationConfiguration.java @@ -7,13 +7,13 @@ import org.springframework.web.multipart.MultipartResolver; import org.springframework.web.multipart.commons.CommonsMultipartResolver; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.view.InternalResourceViewResolver; @Configuration @EnableWebMvc @ComponentScan(basePackages = { "com.baeldung.springmvcforms", "com.baeldung.spring.controller", "com.baeldung.spring.validator" }) -class ApplicationConfiguration extends WebMvcConfigurerAdapter { +class ApplicationConfiguration implements WebMvcConfigurer { @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { diff --git a/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/JadeTemplateConfiguration.java b/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/JadeTemplateConfiguration.java index 10345bac58..4c95e5a0bd 100644 --- a/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/JadeTemplateConfiguration.java +++ b/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/JadeTemplateConfiguration.java @@ -16,24 +16,24 @@ import de.neuland.jade4j.spring.view.JadeViewResolver; public class JadeTemplateConfiguration { @Bean public SpringTemplateLoader templateLoader() { - SpringTemplateLoader templateLoader = new SpringTemplateLoader(); - templateLoader.setBasePath("/WEB-INF/views/"); - templateLoader.setSuffix(".jade"); - return templateLoader; + SpringTemplateLoader templateLoader = new SpringTemplateLoader(); + templateLoader.setBasePath("/WEB-INF/views/"); + templateLoader.setSuffix(".jade"); + return templateLoader; } @Bean public JadeConfiguration jadeConfiguration() { - JadeConfiguration configuration = new JadeConfiguration(); - configuration.setCaching(false); - configuration.setTemplateLoader(templateLoader()); - return configuration; + JadeConfiguration configuration = new JadeConfiguration(); + configuration.setCaching(false); + configuration.setTemplateLoader(templateLoader()); + return configuration; } @Bean public ViewResolver viewResolver() { - JadeViewResolver viewResolver = new JadeViewResolver(); - viewResolver.setConfiguration(jadeConfiguration()); - return viewResolver; + JadeViewResolver viewResolver = new JadeViewResolver(); + viewResolver.setConfiguration(jadeConfiguration()); + return viewResolver; } } diff --git a/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/PushConfiguration.java b/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/PushConfiguration.java new file mode 100644 index 0000000000..3072501cfa --- /dev/null +++ b/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/PushConfiguration.java @@ -0,0 +1,30 @@ +package com.baeldung.spring.configuration; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.servlet.view.InternalResourceViewResolver; + +@Configuration +@EnableWebMvc +@ComponentScan(basePackages = "com.baeldung.spring.controller.push") +public class PushConfiguration implements WebMvcConfigurer { + + @Bean + public InternalResourceViewResolver jspViewResolver() { + InternalResourceViewResolver bean = new InternalResourceViewResolver(); + bean.setPrefix("/WEB-INF/views/"); + bean.setSuffix(".jsp"); + return bean; + } + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/resources/**") + .addResourceLocations("/resources/"); + } + +} diff --git a/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/WebInitializer.java b/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/WebInitializer.java index d57d2c621a..09030a8347 100644 --- a/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/WebInitializer.java +++ b/spring-mvc-simple/src/main/java/com/baeldung/spring/configuration/WebInitializer.java @@ -11,42 +11,23 @@ import javax.servlet.ServletRegistration; public class WebInitializer implements WebApplicationInitializer { - public void onStartup(ServletContext container) throws ServletException { + public void onStartup(ServletContext container) throws ServletException { - AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext(); - ctx.register(ApplicationConfiguration.class); - //ctx.register(ThymeleafConfiguration.class); - //ctx.register(FreemarkerConfiguration.class); - //ctx.register(GroovyConfiguration.class); - //ctx.register(JadeTemplateConfiguration.class); - ctx.setServletContext(container); + AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext(); + ctx.register(ApplicationConfiguration.class); + // ctx.register(ThymeleafConfiguration.class); + // ctx.register(FreemarkerConfiguration.class); + // ctx.register(GroovyConfiguration.class); + // ctx.register(JadeTemplateConfiguration.class); + // ctx.register(PushConfiguration.class); + // ctx.setServletContext(container); - // Manage the lifecycle of the root application context - container.addListener(new ContextLoaderListener(ctx)); + // Manage the lifecycle of the root application context + container.addListener(new ContextLoaderListener(ctx)); - ServletRegistration.Dynamic servlet = container.addServlet("dispatcher", new DispatcherServlet(ctx)); + ServletRegistration.Dynamic servlet = container.addServlet("dispatcher", new DispatcherServlet(ctx)); - servlet.setLoadOnStartup(1); - servlet.addMapping("/"); - - } -// @Override -// public void onStartup(ServletContext container) { -// // Create the 'root' Spring application context -// AnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext(); -// rootContext.register(ServiceConfig.class, JPAConfig.class, SecurityConfig.class); -// -// // Manage the lifecycle of the root application context -// container.addListener(new ContextLoaderListener(rootContext)); -// -// // Create the dispatcher servlet's Spring application context -// AnnotationConfigWebApplicationContext dispatcherServlet = new AnnotationConfigWebApplicationContext(); -// dispatcherServlet.register(MvcConfig.class); -// -// // Register and map the dispatcher servlet -// ServletRegistration.Dynamic dispatcher = container.addServlet("dispatcher", new DispatcherServlet(dispatcherServlet)); -// dispatcher.setLoadOnStartup(1); -// dispatcher.addMapping("/"); -// -// } + servlet.setLoadOnStartup(1); + servlet.addMapping("/"); + } } diff --git a/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/AnnotationMethodHandlerAdapterExample.java b/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/AnnotationMethodHandlerAdapterExample.java index 164830cd6a..89f5b2501b 100644 --- a/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/AnnotationMethodHandlerAdapterExample.java +++ b/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/AnnotationMethodHandlerAdapterExample.java @@ -6,10 +6,10 @@ import org.springframework.web.servlet.ModelAndView; @Controller public class AnnotationMethodHandlerAdapterExample { - @RequestMapping("/annotedName") - public ModelAndView getEmployeeName() { - ModelAndView model = new ModelAndView("Greeting"); - model.addObject("message", "Dinesh"); - return model; - } + @RequestMapping("/annotedName") + public ModelAndView getEmployeeName() { + ModelAndView model = new ModelAndView("Greeting"); + model.addObject("message", "Dinesh"); + return model; + } } \ No newline at end of file diff --git a/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/FileUploadController.java b/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/FileUploadController.java index 47af2ab50d..2ca9e2b135 100644 --- a/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/FileUploadController.java +++ b/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/FileUploadController.java @@ -23,13 +23,13 @@ public class FileUploadController implements HandlerExceptionResolver { } @RequestMapping(value = "/uploadFile", method = RequestMethod.POST) - public ModelAndView uploadFile(MultipartFile file) throws IOException{ + public ModelAndView uploadFile(MultipartFile file) throws IOException { ModelAndView modelAndView = new ModelAndView("file"); - - InputStream in = file.getInputStream(); + + InputStream in = file.getInputStream(); File currDir = new File("."); String path = currDir.getAbsolutePath(); - FileOutputStream f = new FileOutputStream(path.substring(0, path.length()-1)+ file.getOriginalFilename()); + FileOutputStream f = new FileOutputStream(path.substring(0, path.length() - 1) + file.getOriginalFilename()); int ch = 0; while ((ch = in.read()) != -1) { f.write(ch); @@ -37,15 +37,17 @@ public class FileUploadController implements HandlerExceptionResolver { f.flush(); f.close(); - modelAndView.getModel().put("message", "File uploaded successfully!"); + modelAndView.getModel() + .put("message", "File uploaded successfully!"); return modelAndView; } - + @Override - public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object object, Exception exc) { + public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object object, Exception exc) { ModelAndView modelAndView = new ModelAndView("file"); if (exc instanceof MaxUploadSizeExceededException) { - modelAndView.getModel().put("message", "File size exceeds limit!"); + modelAndView.getModel() + .put("message", "File size exceeds limit!"); } return modelAndView; } diff --git a/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/RequestMappingHandlerAdapterExample.java b/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/RequestMappingHandlerAdapterExample.java index 76ac3e2806..754bea79f1 100644 --- a/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/RequestMappingHandlerAdapterExample.java +++ b/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/RequestMappingHandlerAdapterExample.java @@ -6,10 +6,10 @@ import org.springframework.web.servlet.ModelAndView; @Controller public class RequestMappingHandlerAdapterExample { - @RequestMapping("/requestName") - public ModelAndView getEmployeeName() { - ModelAndView model = new ModelAndView("Greeting"); - model.addObject("message", "Madhwal"); - return model; - } + @RequestMapping("/requestName") + public ModelAndView getEmployeeName() { + ModelAndView model = new ModelAndView("Greeting"); + model.addObject("message", "Madhwal"); + return model; + } } \ No newline at end of file diff --git a/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/SimpleControllerHandlerAdapterExample.java b/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/SimpleControllerHandlerAdapterExample.java index bac091ffeb..17c4ab689e 100644 --- a/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/SimpleControllerHandlerAdapterExample.java +++ b/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/SimpleControllerHandlerAdapterExample.java @@ -6,13 +6,11 @@ import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractController; -public class SimpleControllerHandlerAdapterExample extends - AbstractController { - @Override - protected ModelAndView handleRequestInternal(HttpServletRequest request, - HttpServletResponse response) throws Exception { - ModelAndView model = new ModelAndView("Greeting"); - model.addObject("message", "Dinesh Madhwal"); - return model; - } +public class SimpleControllerHandlerAdapterExample extends AbstractController { + @Override + protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { + ModelAndView model = new ModelAndView("Greeting"); + model.addObject("message", "Dinesh Madhwal"); + return model; + } } \ No newline at end of file diff --git a/spring-mvc-push/src/main/java/com/baeldung/controller/PushController.java b/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/push/PushController.java similarity index 93% rename from spring-mvc-push/src/main/java/com/baeldung/controller/PushController.java rename to spring-mvc-simple/src/main/java/com/baeldung/spring/controller/push/PushController.java index c4698fe976..b557c65c93 100644 --- a/spring-mvc-push/src/main/java/com/baeldung/controller/PushController.java +++ b/spring-mvc-simple/src/main/java/com/baeldung/spring/controller/push/PushController.java @@ -1,4 +1,4 @@ -package com.baeldung.controller; +package com.baeldung.spring.controller.push; import javax.servlet.http.PushBuilder; diff --git a/spring-mvc-simple/src/main/resources/spring-servlet_AnnotationMethodHandlerAdapter.xml b/spring-mvc-simple/src/main/resources/spring-servlet_AnnotationMethodHandlerAdapter.xml deleted file mode 100644 index 430b849012..0000000000 --- a/spring-mvc-simple/src/main/resources/spring-servlet_AnnotationMethodHandlerAdapter.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/spring-mvc-simple/src/main/resources/spring-servlet_RequestMappingHandlerAdapter.xml b/spring-mvc-simple/src/main/resources/spring-servlet_RequestMappingHandlerAdapter.xml deleted file mode 100644 index d3783c2e67..0000000000 --- a/spring-mvc-simple/src/main/resources/spring-servlet_RequestMappingHandlerAdapter.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/spring-mvc-simple/src/main/resources/spring-servlet_SimpleControllerHandlerAdapter.xml b/spring-mvc-simple/src/main/resources/spring-servlet_SimpleControllerHandlerAdapter.xml deleted file mode 100644 index 1d6e5628df..0000000000 --- a/spring-mvc-simple/src/main/resources/spring-servlet_SimpleControllerHandlerAdapter.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/spring-mvc-push/src/main/webapp/WEB-INF/views/demo.jsp b/spring-mvc-simple/src/main/webapp/WEB-INF/views/demo.jsp similarity index 88% rename from spring-mvc-push/src/main/webapp/WEB-INF/views/demo.jsp rename to spring-mvc-simple/src/main/webapp/WEB-INF/views/demo.jsp index 28b27322ae..d5579debf7 100644 --- a/spring-mvc-push/src/main/webapp/WEB-INF/views/demo.jsp +++ b/spring-mvc-simple/src/main/webapp/WEB-INF/views/demo.jsp @@ -12,7 +12,6 @@ " alt="Logo" height="126" width="411">
-
Go to - index + \ No newline at end of file diff --git a/spring-mvc-simple/src/main/webapp/WEB-INF/views/registration-jade.jade b/spring-mvc-simple/src/main/webapp/WEB-INF/views/registration-jade.jade index 44b6293ff0..f271ac6852 100644 --- a/spring-mvc-simple/src/main/webapp/WEB-INF/views/registration-jade.jade +++ b/spring-mvc-simple/src/main/webapp/WEB-INF/views/registration-jade.jade @@ -4,7 +4,7 @@ html title User Registration body form(action="register" method="post" ) - label(for="email") Emailaaaaaaaa: + label(for="email") Email: input(type="text" name="email") label(for="password") Password: input(type="password" name="password") diff --git a/spring-mvc-push/src/main/webapp/resources/logo.png b/spring-mvc-simple/src/main/webapp/resources/logo.png similarity index 100% rename from spring-mvc-push/src/main/webapp/resources/logo.png rename to spring-mvc-simple/src/main/webapp/resources/logo.png diff --git a/spring-mvc-push/src/test/java/com/baeldung/controller/PushControllerIntegrationTest.java b/spring-mvc-simple/src/test/java/com/baeldung/controller/push/PushControllerIntegrationTest.java similarity index 91% rename from spring-mvc-push/src/test/java/com/baeldung/controller/PushControllerIntegrationTest.java rename to spring-mvc-simple/src/test/java/com/baeldung/controller/push/PushControllerIntegrationTest.java index 570e05cad6..a03d02895f 100644 --- a/spring-mvc-push/src/test/java/com/baeldung/controller/PushControllerIntegrationTest.java +++ b/spring-mvc-simple/src/test/java/com/baeldung/controller/push/PushControllerIntegrationTest.java @@ -1,10 +1,9 @@ -package com.baeldung.controller; +package com.baeldung.controller.push; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig; @@ -12,9 +11,8 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; -import com.baeldung.config.PushConfiguration; +import com.baeldung.spring.configuration.PushConfiguration; -@Disabled @SpringJUnitWebConfig(PushConfiguration.class) public class PushControllerIntegrationTest { @Autowired