Java-633 Standardize packages in spring-mvc-*

This commit is contained in:
mikr
2020-02-18 15:38:19 +01:00
parent 58e029371a
commit 00ab1d7ede
63 changed files with 119 additions and 101 deletions

View File

@@ -1,4 +1,4 @@
package org.baeldung.controller.config;
package com.baeldung.controller.config;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;

View File

@@ -1,4 +1,4 @@
package org.baeldung.controller.config;
package com.baeldung.controller.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@@ -11,7 +11,7 @@ import org.springframework.web.servlet.view.InternalResourceViewResolver;
@Configuration
@EnableWebMvc
@ComponentScan(basePackages = { "org.baeldung.controller.controller", "com.baeldung.controller", "org.baeldung.controller.config" })
@ComponentScan(basePackages = { "com.baeldung.controller.controller", "com.baeldung.controller", "com.baeldung.controller.config" })
public class WebConfig implements WebMvcConfigurer {
@Override
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {

View File

@@ -1,4 +1,4 @@
package org.baeldung.controller.controller;
package com.baeldung.controller.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;

View File

@@ -1,6 +1,6 @@
package org.baeldung.controller.controller;
package com.baeldung.controller.controller;
import org.baeldung.controller.student.Student;
import com.baeldung.controller.student.Student;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

View File

@@ -1,6 +1,6 @@
package org.baeldung.controller.controller;
package com.baeldung.controller.controller;
import org.baeldung.controller.student.Student;
import com.baeldung.controller.student.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

View File

@@ -2,7 +2,7 @@
/**
* @author Prashant Dutta
*/
package org.baeldung.controller.controller;
package com.baeldung.controller.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

View File

@@ -1,4 +1,4 @@
package org.baeldung.controller.student;
package com.baeldung.controller.student;
public class Student {
private String name;

View File

@@ -10,7 +10,7 @@
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
<context:component-scan base-package="org.baeldung.controller.controller"/>
<context:component-scan base-package="com.baeldung.controller.controller"/>
<mvc:annotation-driven/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">

View File

@@ -29,7 +29,7 @@
</context-param>-->
<!--<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>org.baeldung.bean.config</param-value>
<param-value>com.baeldung.bean.config</param-value>
</context-param>-->
<!-- secure web app context -->

View File

@@ -1,8 +1,8 @@
package org.baeldung.controller;
package com.baeldung.controller;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.baeldung.controller.config.WebConfig;
import org.baeldung.controller.student.Student;
import com.baeldung.controller.config.WebConfig;
import com.baeldung.controller.student.Student;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

View File

@@ -1,4 +1,4 @@
package org.baeldung.controller;
package com.baeldung.controller;
import org.junit.Assert;
import org.junit.Before;
@@ -14,7 +14,7 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.servlet.ModelAndView;
import org.baeldung.controller.student.Student;
import com.baeldung.controller.student.Student;
import com.fasterxml.jackson.databind.ObjectMapper;
@RunWith(SpringJUnit4ClassRunner.class)

View File

@@ -1,4 +1,4 @@
package org.baeldung.controller;
package com.baeldung.controller;
import org.junit.Assert;
import org.junit.Before;
@@ -15,7 +15,7 @@ import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.servlet.ModelAndView;
/**
* This is the test class for {@link org.baeldung.controller.controller.PassParametersController} class.
* This is the test class for {@link com.baeldung.controller.controller.PassParametersController} class.
* 09/09/2017
*
* @author Ahmet Cetin

View File

@@ -12,7 +12,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import org.baeldung.controller.config.WebConfig;
import com.baeldung.controller.config.WebConfig;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration

View File

@@ -12,7 +12,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import org.baeldung.controller.config.WebConfig;
import com.baeldung.controller.config.WebConfig;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration

View File

@@ -12,7 +12,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import org.baeldung.controller.config.WebConfig;
import com.baeldung.controller.config.WebConfig;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration

View File

@@ -12,7 +12,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import org.baeldung.controller.config.WebConfig;
import com.baeldung.controller.config.WebConfig;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration

View File

@@ -12,7 +12,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import org.baeldung.controller.config.WebConfig;
import com.baeldung.controller.config.WebConfig;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration

View File

@@ -10,7 +10,7 @@
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
<context:component-scan base-package="org.baeldung.controller.controller" />
<context:component-scan base-package="com.baeldung.controller.controller" />
<mvc:annotation-driven />
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">