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

@@ -138,7 +138,7 @@
<properties>
<!-- 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>
<bootstrap.version>3.3.7-1</bootstrap.version>
<jpa.version>2.2</jpa.version>

View File

@@ -1,4 +1,4 @@
package org.baeldung.boot;
package com.baeldung.boot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@@ -1,12 +1,12 @@
package org.baeldung.boot.config;
package com.baeldung.boot.config;
import java.util.List;
import org.baeldung.boot.converter.GenericBigDecimalConverter;
import org.baeldung.boot.converter.StringToAbstractEntityConverterFactory;
import org.baeldung.boot.converter.StringToEmployeeConverter;
import org.baeldung.boot.converter.StringToEnumConverter;
import org.baeldung.boot.web.resolver.HeaderVersionArgumentResolver;
import com.baeldung.boot.converter.GenericBigDecimalConverter;
import com.baeldung.boot.converter.StringToAbstractEntityConverterFactory;
import com.baeldung.boot.converter.StringToEmployeeConverter;
import com.baeldung.boot.converter.StringToEnumConverter;
import com.baeldung.boot.web.resolver.HeaderVersionArgumentResolver;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;

View File

@@ -1,8 +1,8 @@
package org.baeldung.boot.controller;
package com.baeldung.boot.controller;
import org.baeldung.boot.domain.GenericEntity;
import org.baeldung.boot.domain.Modes;
import org.baeldung.boot.web.resolver.Version;
import com.baeldung.boot.domain.GenericEntity;
import com.baeldung.boot.domain.Modes;
import com.baeldung.boot.web.resolver.Version;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;

View File

@@ -1,4 +1,4 @@
package org.baeldung.boot.converter;
package com.baeldung.boot.converter;
import com.google.common.collect.ImmutableSet;
import org.springframework.core.convert.TypeDescriptor;

View File

@@ -1,8 +1,8 @@
package org.baeldung.boot.converter;
package com.baeldung.boot.converter;
import org.baeldung.boot.domain.AbstractEntity;
import org.baeldung.boot.domain.Bar;
import org.baeldung.boot.domain.Foo;
import com.baeldung.boot.domain.AbstractEntity;
import com.baeldung.boot.domain.Bar;
import com.baeldung.boot.domain.Foo;
import org.springframework.core.convert.converter.Converter;
import org.springframework.core.convert.converter.ConverterFactory;

View File

@@ -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;
public class StringToEmployeeConverter implements Converter<String, Employee> {

View File

@@ -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;
public class StringToEnumConverter implements Converter<String, Modes> {

View File

@@ -1,4 +1,4 @@
package org.baeldung.boot.converter;
package com.baeldung.boot.converter;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

View File

@@ -1,8 +1,8 @@
package org.baeldung.boot.converter.controller;
package com.baeldung.boot.converter.controller;
import org.baeldung.boot.domain.Bar;
import org.baeldung.boot.domain.Foo;
import org.baeldung.boot.domain.Modes;
import com.baeldung.boot.domain.Bar;
import com.baeldung.boot.domain.Foo;
import com.baeldung.boot.domain.Modes;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

View File

@@ -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.web.bind.annotation.*;

View File

@@ -1,4 +1,4 @@
package org.baeldung.boot.domain;
package com.baeldung.boot.domain;
public abstract class AbstractEntity {

View File

@@ -1,4 +1,4 @@
package org.baeldung.boot.domain;
package com.baeldung.boot.domain;
public class Bar extends AbstractEntity {

View File

@@ -1,4 +1,4 @@
package org.baeldung.boot.domain;
package com.baeldung.boot.domain;
import javax.persistence.Entity;
import javax.persistence.Id;

View File

@@ -1,4 +1,4 @@
package org.baeldung.boot.domain;
package com.baeldung.boot.domain;
import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric;
public class Foo extends AbstractEntity {

View File

@@ -1,4 +1,4 @@
package org.baeldung.boot.domain;
package com.baeldung.boot.domain;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;

View File

@@ -1,4 +1,4 @@
package org.baeldung.boot.domain;
package com.baeldung.boot.domain;
public enum Modes {

View File

@@ -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;
public interface GenericEntityRepository extends JpaRepository<GenericEntity, Long> {

View File

@@ -1,4 +1,4 @@
package org.baeldung.boot.web.resolver;
package com.baeldung.boot.web.resolver;
import org.springframework.core.MethodParameter;
import org.springframework.stereotype.Component;

View File

@@ -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.Retention;

View File

@@ -1,4 +1,4 @@
package org.baeldung.cachedrequest;
package com.baeldung.cachedrequest;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;

View File

@@ -1,4 +1,4 @@
package org.baeldung.cachedrequest;
package com.baeldung.cachedrequest;
import java.io.ByteArrayInputStream;
import java.io.IOException;

View File

@@ -1,4 +1,4 @@
package org.baeldung.cachedrequest;
package com.baeldung.cachedrequest;
import java.io.IOException;

View File

@@ -1,4 +1,4 @@
package org.baeldung.cachedrequest;
package com.baeldung.cachedrequest;
import org.springframework.context.annotation.ComponentScan;
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;
/**
* To initialize the WebApplication, Please see
* {@link org.baeldung.spring.config.MainWebAppInitializer}
* {@link com.baeldung.spring.config.MainWebAppInitializer}
*/
@EnableWebMvc
@Configuration
@ComponentScan(basePackages = "org.baeldung.cachedrequest")
@ComponentScan(basePackages = "com.baeldung.cachedrequest")
public class HttpRequestDemoConfig implements WebMvcConfigurer {
}

View File

@@ -1,4 +1,4 @@
package org.baeldung.cachedrequest;
package com.baeldung.cachedrequest;
public class Person {
private String firstName;

View File

@@ -1,4 +1,4 @@
package org.baeldung.cachedrequest;
package com.baeldung.cachedrequest;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;

View File

@@ -1,4 +1,4 @@
package org.baeldung.cachedrequest;
package com.baeldung.cachedrequest;
import java.io.IOException;

View File

@@ -1,7 +1,7 @@
package com.baeldung;
import org.baeldung.boot.Application;
import org.baeldung.boot.domain.Modes;
import com.baeldung.boot.Application;
import com.baeldung.boot.domain.Modes;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -1,8 +1,8 @@
package com.baeldung;
import org.baeldung.boot.Application;
import org.baeldung.boot.domain.GenericEntity;
import org.baeldung.boot.repository.GenericEntityRepository;
import com.baeldung.boot.Application;
import com.baeldung.boot.domain.GenericEntity;
import com.baeldung.boot.repository.GenericEntityRepository;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -1,6 +1,6 @@
package com.baeldung;
import org.baeldung.boot.Application;
import com.baeldung.boot.Application;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

View File

@@ -1,4 +1,4 @@
package org.baeldung.cachedrequest;
package com.baeldung.cachedrequest;
import java.io.BufferedReader;
import java.io.IOException;

View File

@@ -1,4 +1,4 @@
package org.baeldung.cachedrequest;
package com.baeldung.cachedrequest;
import java.io.ByteArrayOutputStream;
import java.io.IOException;

View File

@@ -1,4 +1,4 @@
package org.baeldung.cachedrequest;
package com.baeldung.cachedrequest;
import java.io.IOException;

View File

@@ -1,4 +1,4 @@
package org.baeldung.cachedrequest;
package com.baeldung.cachedrequest;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Before;

View File

@@ -1,4 +1,4 @@
package org.baeldung.cachedrequest;
package com.baeldung.cachedrequest;
import java.io.IOException;