Merge pull request #8749 from Maiklins/JAVA-633-standardize-packages-spring-mvc
Java-633 standardize packages spring mvc
This commit is contained in:
commit
39bcf24936
|
@ -36,12 +36,12 @@
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>default-tools.jar</id>
|
<id>default-profile</id>
|
||||||
<activation>
|
<activation>
|
||||||
<property>
|
<activeByDefault>true</activeByDefault>
|
||||||
<name>java.vendor</name>
|
<file>
|
||||||
<value>Oracle Corporation</value>
|
<exists>${java.home}/../lib/tools.jar</exists>
|
||||||
</property>
|
</file>
|
||||||
</activation>
|
</activation>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -53,6 +53,24 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>mac-profile</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>false</activeByDefault>
|
||||||
|
<file>
|
||||||
|
<exists>${java.home}/../Classes/classes.jar</exists>
|
||||||
|
</file>
|
||||||
|
</activation>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sun</groupId>
|
||||||
|
<artifactId>tools</artifactId>
|
||||||
|
<version>${java.version}</version>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${java.home}/../Classes/classes.jar</systemPath>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -138,7 +138,7 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- The main class to start by executing java -jar -->
|
<!-- The main class to start by executing java -jar -->
|
||||||
<start-class>org.baeldung.boot.Application</start-class>
|
<start-class>com.baeldung.boot.Application</start-class>
|
||||||
<jquery.version>3.1.1</jquery.version>
|
<jquery.version>3.1.1</jquery.version>
|
||||||
<bootstrap.version>3.3.7-1</bootstrap.version>
|
<bootstrap.version>3.3.7-1</bootstrap.version>
|
||||||
<jpa.version>2.2</jpa.version>
|
<jpa.version>2.2</jpa.version>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.boot;
|
package com.baeldung.boot;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package org.baeldung.boot.config;
|
package com.baeldung.boot.config;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.baeldung.boot.converter.GenericBigDecimalConverter;
|
import com.baeldung.boot.converter.GenericBigDecimalConverter;
|
||||||
import org.baeldung.boot.converter.StringToAbstractEntityConverterFactory;
|
import com.baeldung.boot.converter.StringToAbstractEntityConverterFactory;
|
||||||
import org.baeldung.boot.converter.StringToEmployeeConverter;
|
import com.baeldung.boot.converter.StringToEmployeeConverter;
|
||||||
import org.baeldung.boot.converter.StringToEnumConverter;
|
import com.baeldung.boot.converter.StringToEnumConverter;
|
||||||
import org.baeldung.boot.web.resolver.HeaderVersionArgumentResolver;
|
import com.baeldung.boot.web.resolver.HeaderVersionArgumentResolver;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.format.FormatterRegistry;
|
import org.springframework.format.FormatterRegistry;
|
||||||
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package org.baeldung.boot.controller;
|
package com.baeldung.boot.controller;
|
||||||
|
|
||||||
import org.baeldung.boot.domain.GenericEntity;
|
import com.baeldung.boot.domain.GenericEntity;
|
||||||
import org.baeldung.boot.domain.Modes;
|
import com.baeldung.boot.domain.Modes;
|
||||||
import org.baeldung.boot.web.resolver.Version;
|
import com.baeldung.boot.web.resolver.Version;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.boot.converter;
|
package com.baeldung.boot.converter;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import org.springframework.core.convert.TypeDescriptor;
|
import org.springframework.core.convert.TypeDescriptor;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package org.baeldung.boot.converter;
|
package com.baeldung.boot.converter;
|
||||||
|
|
||||||
import org.baeldung.boot.domain.AbstractEntity;
|
import com.baeldung.boot.domain.AbstractEntity;
|
||||||
import org.baeldung.boot.domain.Bar;
|
import com.baeldung.boot.domain.Bar;
|
||||||
import org.baeldung.boot.domain.Foo;
|
import com.baeldung.boot.domain.Foo;
|
||||||
import org.springframework.core.convert.converter.Converter;
|
import org.springframework.core.convert.converter.Converter;
|
||||||
import org.springframework.core.convert.converter.ConverterFactory;
|
import org.springframework.core.convert.converter.ConverterFactory;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package org.baeldung.boot.converter;
|
package com.baeldung.boot.converter;
|
||||||
|
|
||||||
import org.baeldung.boot.domain.Employee;
|
import com.baeldung.boot.domain.Employee;
|
||||||
import org.springframework.core.convert.converter.Converter;
|
import org.springframework.core.convert.converter.Converter;
|
||||||
|
|
||||||
public class StringToEmployeeConverter implements Converter<String, Employee> {
|
public class StringToEmployeeConverter implements Converter<String, Employee> {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package org.baeldung.boot.converter;
|
package com.baeldung.boot.converter;
|
||||||
|
|
||||||
import org.baeldung.boot.domain.Modes;
|
import com.baeldung.boot.domain.Modes;
|
||||||
import org.springframework.core.convert.converter.Converter;
|
import org.springframework.core.convert.converter.Converter;
|
||||||
|
|
||||||
public class StringToEnumConverter implements Converter<String, Modes> {
|
public class StringToEnumConverter implements Converter<String, Modes> {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.boot.converter;
|
package com.baeldung.boot.converter;
|
||||||
|
|
||||||
import org.springframework.core.convert.converter.Converter;
|
import org.springframework.core.convert.converter.Converter;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package org.baeldung.boot.converter.controller;
|
package com.baeldung.boot.converter.controller;
|
||||||
|
|
||||||
import org.baeldung.boot.domain.Bar;
|
import com.baeldung.boot.domain.Bar;
|
||||||
import org.baeldung.boot.domain.Foo;
|
import com.baeldung.boot.domain.Foo;
|
||||||
import org.baeldung.boot.domain.Modes;
|
import com.baeldung.boot.domain.Modes;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package org.baeldung.boot.converter.controller;
|
package com.baeldung.boot.converter.controller;
|
||||||
|
|
||||||
import org.baeldung.boot.domain.Employee;
|
import com.baeldung.boot.domain.Employee;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.boot.domain;
|
package com.baeldung.boot.domain;
|
||||||
|
|
||||||
public abstract class AbstractEntity {
|
public abstract class AbstractEntity {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.boot.domain;
|
package com.baeldung.boot.domain;
|
||||||
|
|
||||||
public class Bar extends AbstractEntity {
|
public class Bar extends AbstractEntity {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.boot.domain;
|
package com.baeldung.boot.domain;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.boot.domain;
|
package com.baeldung.boot.domain;
|
||||||
|
|
||||||
import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric;
|
import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric;
|
||||||
public class Foo extends AbstractEntity {
|
public class Foo extends AbstractEntity {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.boot.domain;
|
package com.baeldung.boot.domain;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.boot.domain;
|
package com.baeldung.boot.domain;
|
||||||
|
|
||||||
public enum Modes {
|
public enum Modes {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package org.baeldung.boot.repository;
|
package com.baeldung.boot.repository;
|
||||||
|
|
||||||
import org.baeldung.boot.domain.GenericEntity;
|
import com.baeldung.boot.domain.GenericEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
public interface GenericEntityRepository extends JpaRepository<GenericEntity, Long> {
|
public interface GenericEntityRepository extends JpaRepository<GenericEntity, Long> {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.boot.web.resolver;
|
package com.baeldung.boot.web.resolver;
|
||||||
|
|
||||||
import org.springframework.core.MethodParameter;
|
import org.springframework.core.MethodParameter;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.boot.web.resolver;
|
package com.baeldung.boot.web.resolver;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.cachedrequest;
|
package com.baeldung.cachedrequest;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.cachedrequest;
|
package com.baeldung.cachedrequest;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.cachedrequest;
|
package com.baeldung.cachedrequest;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.cachedrequest;
|
package com.baeldung.cachedrequest;
|
||||||
|
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
@ -6,12 +6,12 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
/**
|
/**
|
||||||
* To initialize the WebApplication, Please see
|
* To initialize the WebApplication, Please see
|
||||||
* {@link org.baeldung.spring.config.MainWebAppInitializer}
|
* {@link com.baeldung.spring.config.MainWebAppInitializer}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@EnableWebMvc
|
@EnableWebMvc
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan(basePackages = "org.baeldung.cachedrequest")
|
@ComponentScan(basePackages = "com.baeldung.cachedrequest")
|
||||||
public class HttpRequestDemoConfig implements WebMvcConfigurer {
|
public class HttpRequestDemoConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.cachedrequest;
|
package com.baeldung.cachedrequest;
|
||||||
|
|
||||||
public class Person {
|
public class Person {
|
||||||
private String firstName;
|
private String firstName;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.cachedrequest;
|
package com.baeldung.cachedrequest;
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.cachedrequest;
|
package com.baeldung.cachedrequest;
|
||||||
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.baeldung;
|
package com.baeldung;
|
||||||
|
|
||||||
import org.baeldung.boot.Application;
|
import com.baeldung.boot.Application;
|
||||||
import org.baeldung.boot.domain.Modes;
|
import com.baeldung.boot.domain.Modes;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package com.baeldung;
|
package com.baeldung;
|
||||||
|
|
||||||
import org.baeldung.boot.Application;
|
import com.baeldung.boot.Application;
|
||||||
import org.baeldung.boot.domain.GenericEntity;
|
import com.baeldung.boot.domain.GenericEntity;
|
||||||
import org.baeldung.boot.repository.GenericEntityRepository;
|
import com.baeldung.boot.repository.GenericEntityRepository;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.baeldung;
|
package com.baeldung;
|
||||||
|
|
||||||
import org.baeldung.boot.Application;
|
import com.baeldung.boot.Application;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.cachedrequest;
|
package com.baeldung.cachedrequest;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.cachedrequest;
|
package com.baeldung.cachedrequest;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.cachedrequest;
|
package com.baeldung.cachedrequest;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.cachedrequest;
|
package com.baeldung.cachedrequest;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.cachedrequest;
|
package com.baeldung.cachedrequest;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.controller.config;
|
package com.baeldung.controller.config;
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
import javax.servlet.ServletContext;
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
|
|
|
@ -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.Bean;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
@ -11,7 +11,7 @@ import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableWebMvc
|
@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 {
|
public class WebConfig implements WebMvcConfigurer {
|
||||||
@Override
|
@Override
|
||||||
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
|
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.controller.controller;
|
package com.baeldung.controller.controller;
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
|
|
|
@ -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.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
|
@ -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.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/**
|
/**
|
||||||
* @author Prashant Dutta
|
* @author Prashant Dutta
|
||||||
*/
|
*/
|
||||||
package org.baeldung.controller.controller;
|
package com.baeldung.controller.controller;
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.controller.student;
|
package com.baeldung.controller.student;
|
||||||
|
|
||||||
public class Student {
|
public class Student {
|
||||||
private String name;
|
private String name;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
http://www.springframework.org/schema/context/spring-context-4.0.xsd
|
http://www.springframework.org/schema/context/spring-context-4.0.xsd
|
||||||
http://www.springframework.org/schema/mvc
|
http://www.springframework.org/schema/mvc
|
||||||
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
|
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/>
|
<mvc:annotation-driven/>
|
||||||
|
|
||||||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</context-param>-->
|
</context-param>-->
|
||||||
<!--<context-param>
|
<!--<context-param>
|
||||||
<param-name>contextConfigLocation</param-name>
|
<param-name>contextConfigLocation</param-name>
|
||||||
<param-value>org.baeldung.bean.config</param-value>
|
<param-value>com.baeldung.bean.config</param-value>
|
||||||
</context-param>-->
|
</context-param>-->
|
||||||
|
|
||||||
<!-- secure web app context -->
|
<!-- secure web app context -->
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package org.baeldung.controller;
|
package com.baeldung.controller;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import org.baeldung.controller.config.WebConfig;
|
import com.baeldung.controller.config.WebConfig;
|
||||||
import org.baeldung.controller.student.Student;
|
import com.baeldung.controller.student.Student;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.controller;
|
package com.baeldung.controller;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
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.context.WebApplicationContext;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import org.baeldung.controller.student.Student;
|
import com.baeldung.controller.student.Student;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.controller;
|
package com.baeldung.controller;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
@ -15,7 +15,7 @@ import org.springframework.web.context.WebApplicationContext;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
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
|
* 09/09/2017
|
||||||
*
|
*
|
||||||
* @author Ahmet Cetin
|
* @author Ahmet Cetin
|
||||||
|
|
|
@ -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.result.MockMvcResultMatchers;
|
||||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||||
import org.springframework.web.context.WebApplicationContext;
|
import org.springframework.web.context.WebApplicationContext;
|
||||||
import org.baeldung.controller.config.WebConfig;
|
import com.baeldung.controller.config.WebConfig;
|
||||||
|
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@WebAppConfiguration
|
@WebAppConfiguration
|
||||||
|
|
|
@ -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.result.MockMvcResultMatchers;
|
||||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||||
import org.springframework.web.context.WebApplicationContext;
|
import org.springframework.web.context.WebApplicationContext;
|
||||||
import org.baeldung.controller.config.WebConfig;
|
import com.baeldung.controller.config.WebConfig;
|
||||||
|
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@WebAppConfiguration
|
@WebAppConfiguration
|
||||||
|
|
|
@ -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.result.MockMvcResultMatchers;
|
||||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||||
import org.springframework.web.context.WebApplicationContext;
|
import org.springframework.web.context.WebApplicationContext;
|
||||||
import org.baeldung.controller.config.WebConfig;
|
import com.baeldung.controller.config.WebConfig;
|
||||||
|
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@WebAppConfiguration
|
@WebAppConfiguration
|
||||||
|
|
|
@ -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.result.MockMvcResultMatchers;
|
||||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||||
import org.springframework.web.context.WebApplicationContext;
|
import org.springframework.web.context.WebApplicationContext;
|
||||||
import org.baeldung.controller.config.WebConfig;
|
import com.baeldung.controller.config.WebConfig;
|
||||||
|
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@WebAppConfiguration
|
@WebAppConfiguration
|
||||||
|
|
|
@ -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.result.MockMvcResultMatchers;
|
||||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||||
import org.springframework.web.context.WebApplicationContext;
|
import org.springframework.web.context.WebApplicationContext;
|
||||||
import org.baeldung.controller.config.WebConfig;
|
import com.baeldung.controller.config.WebConfig;
|
||||||
|
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@WebAppConfiguration
|
@WebAppConfiguration
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
http://www.springframework.org/schema/context/spring-context-4.0.xsd
|
http://www.springframework.org/schema/context/spring-context-4.0.xsd
|
||||||
http://www.springframework.org/schema/mvc
|
http://www.springframework.org/schema/mvc
|
||||||
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
|
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 />
|
<mvc:annotation-driven />
|
||||||
|
|
||||||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung;
|
package com.baeldung;
|
||||||
|
|
||||||
import com.baeldung.springmvcforms.configuration.ApplicationConfiguration;
|
import com.baeldung.springmvcforms.configuration.ApplicationConfiguration;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.listbindingexample;
|
package com.baeldung.listbindingexample;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.sessionattrs;
|
package com.baeldung.sessionattrs;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung;
|
package com.baeldung;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package org.baeldung.servlet;
|
package com.baeldung.servlet;
|
||||||
|
|
||||||
import javax.servlet.ServletRegistration.Dynamic;
|
import javax.servlet.ServletRegistration.Dynamic;
|
||||||
|
|
||||||
import org.baeldung.spring.WebFlowConfig;
|
import com.baeldung.spring.WebFlowConfig;
|
||||||
import org.baeldung.spring.WebMvcConfig;
|
import com.baeldung.spring.WebMvcConfig;
|
||||||
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
|
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
|
||||||
|
|
||||||
public class WebInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
|
public class WebInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.spring;
|
package com.baeldung.spring;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.spring;
|
package com.baeldung.spring;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package org.baeldung;
|
package com.baeldung;
|
||||||
|
|
||||||
import org.baeldung.spring.WebFlowConfig;
|
import com.baeldung.spring.WebFlowConfig;
|
||||||
import org.baeldung.spring.WebMvcConfig;
|
import com.baeldung.spring.WebMvcConfig;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung;
|
package com.baeldung;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
Loading…
Reference in New Issue