diff --git a/spring-rest/src/main/java/org/baeldung/resttemplate/lists/EmployeeApplication.java b/spring-rest/src/main/java/com/baeldung/resttemplate/lists/EmployeeApplication.java similarity index 90% rename from spring-rest/src/main/java/org/baeldung/resttemplate/lists/EmployeeApplication.java rename to spring-rest/src/main/java/com/baeldung/resttemplate/lists/EmployeeApplication.java index baaa4c4d80..1967d4f2aa 100644 --- a/spring-rest/src/main/java/org/baeldung/resttemplate/lists/EmployeeApplication.java +++ b/spring-rest/src/main/java/com/baeldung/resttemplate/lists/EmployeeApplication.java @@ -1,4 +1,4 @@ -package org.baeldung.resttemplate.lists; +package com.baeldung.resttemplate.lists; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/spring-rest/src/main/java/org/baeldung/resttemplate/lists/client/EmployeeClient.java b/spring-rest/src/main/java/com/baeldung/resttemplate/lists/client/EmployeeClient.java similarity index 94% rename from spring-rest/src/main/java/org/baeldung/resttemplate/lists/client/EmployeeClient.java rename to spring-rest/src/main/java/com/baeldung/resttemplate/lists/client/EmployeeClient.java index 729fa3ca3e..d811045733 100644 --- a/spring-rest/src/main/java/org/baeldung/resttemplate/lists/client/EmployeeClient.java +++ b/spring-rest/src/main/java/com/baeldung/resttemplate/lists/client/EmployeeClient.java @@ -1,11 +1,12 @@ -package org.baeldung.resttemplate.lists.client; +package com.baeldung.resttemplate.lists.client; -import org.baeldung.resttemplate.lists.dto.Employee; -import org.baeldung.resttemplate.lists.dto.EmployeeList; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.*; import org.springframework.web.client.RestTemplate; +import com.baeldung.resttemplate.lists.dto.Employee; +import com.baeldung.resttemplate.lists.dto.EmployeeList; + import java.util.ArrayList; import java.util.List; diff --git a/spring-rest/src/main/java/org/baeldung/resttemplate/lists/controller/EmployeeResource.java b/spring-rest/src/main/java/com/baeldung/resttemplate/lists/controller/EmployeeResource.java similarity index 85% rename from spring-rest/src/main/java/org/baeldung/resttemplate/lists/controller/EmployeeResource.java rename to spring-rest/src/main/java/com/baeldung/resttemplate/lists/controller/EmployeeResource.java index f051c6a78b..8a4d510f63 100644 --- a/spring-rest/src/main/java/org/baeldung/resttemplate/lists/controller/EmployeeResource.java +++ b/spring-rest/src/main/java/com/baeldung/resttemplate/lists/controller/EmployeeResource.java @@ -1,14 +1,15 @@ -package org.baeldung.resttemplate.lists.controller; +package com.baeldung.resttemplate.lists.controller; -import org.baeldung.resttemplate.lists.dto.Employee; -import org.baeldung.resttemplate.lists.dto.EmployeeList; -import org.baeldung.resttemplate.lists.service.EmployeeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; +import com.baeldung.resttemplate.lists.dto.Employee; +import com.baeldung.resttemplate.lists.dto.EmployeeList; +import com.baeldung.resttemplate.lists.service.EmployeeService; + import java.util.List; @RestController diff --git a/spring-rest/src/main/java/org/baeldung/resttemplate/lists/dto/Employee.java b/spring-rest/src/main/java/com/baeldung/resttemplate/lists/dto/Employee.java similarity index 92% rename from spring-rest/src/main/java/org/baeldung/resttemplate/lists/dto/Employee.java rename to spring-rest/src/main/java/com/baeldung/resttemplate/lists/dto/Employee.java index bd8ebbf969..0754c13c5b 100644 --- a/spring-rest/src/main/java/org/baeldung/resttemplate/lists/dto/Employee.java +++ b/spring-rest/src/main/java/com/baeldung/resttemplate/lists/dto/Employee.java @@ -1,4 +1,4 @@ -package org.baeldung.resttemplate.lists.dto; +package com.baeldung.resttemplate.lists.dto; public class Employee { diff --git a/spring-rest/src/main/java/org/baeldung/resttemplate/lists/dto/EmployeeList.java b/spring-rest/src/main/java/com/baeldung/resttemplate/lists/dto/EmployeeList.java similarity index 91% rename from spring-rest/src/main/java/org/baeldung/resttemplate/lists/dto/EmployeeList.java rename to spring-rest/src/main/java/com/baeldung/resttemplate/lists/dto/EmployeeList.java index 2bb86ac5b4..eeabbfe450 100644 --- a/spring-rest/src/main/java/org/baeldung/resttemplate/lists/dto/EmployeeList.java +++ b/spring-rest/src/main/java/com/baeldung/resttemplate/lists/dto/EmployeeList.java @@ -1,4 +1,4 @@ -package org.baeldung.resttemplate.lists.dto; +package com.baeldung.resttemplate.lists.dto; import java.util.ArrayList; import java.util.List; diff --git a/spring-rest/src/main/java/org/baeldung/resttemplate/lists/service/EmployeeService.java b/spring-rest/src/main/java/com/baeldung/resttemplate/lists/service/EmployeeService.java similarity index 83% rename from spring-rest/src/main/java/org/baeldung/resttemplate/lists/service/EmployeeService.java rename to spring-rest/src/main/java/com/baeldung/resttemplate/lists/service/EmployeeService.java index 08196dda77..226134787f 100644 --- a/spring-rest/src/main/java/org/baeldung/resttemplate/lists/service/EmployeeService.java +++ b/spring-rest/src/main/java/com/baeldung/resttemplate/lists/service/EmployeeService.java @@ -1,8 +1,9 @@ -package org.baeldung.resttemplate.lists.service; +package com.baeldung.resttemplate.lists.service; -import org.baeldung.resttemplate.lists.dto.Employee; import org.springframework.stereotype.Service; +import com.baeldung.resttemplate.lists.dto.Employee; + import java.util.ArrayList; import java.util.List; diff --git a/spring-rest/src/main/java/org/baeldung/config/MainApplication.java b/spring-rest/src/main/java/com/baeldung/sampleapp/config/MainApplication.java similarity index 85% rename from spring-rest/src/main/java/org/baeldung/config/MainApplication.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/config/MainApplication.java index 6a7fdc041a..507f340e9d 100644 --- a/spring-rest/src/main/java/org/baeldung/config/MainApplication.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/config/MainApplication.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.sampleapp.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; @@ -6,7 +6,7 @@ import org.springframework.context.annotation.ComponentScan; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @EnableAutoConfiguration -@ComponentScan("org.baeldung") +@ComponentScan("com.baeldung.sampleapp") public class MainApplication implements WebMvcConfigurer { public static void main(final String[] args) { diff --git a/spring-rest/src/main/java/org/baeldung/config/RestClientConfig.java b/spring-rest/src/main/java/com/baeldung/sampleapp/config/RestClientConfig.java similarity index 85% rename from spring-rest/src/main/java/org/baeldung/config/RestClientConfig.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/config/RestClientConfig.java index 8743af20fe..8abc368bdb 100644 --- a/spring-rest/src/main/java/org/baeldung/config/RestClientConfig.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/config/RestClientConfig.java @@ -1,15 +1,16 @@ -package org.baeldung.config; +package com.baeldung.sampleapp.config; import java.util.ArrayList; import java.util.List; -import org.baeldung.interceptors.RestTemplateHeaderModifierInterceptor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.client.ClientHttpRequestInterceptor; import org.springframework.util.CollectionUtils; import org.springframework.web.client.RestTemplate; +import com.baeldung.sampleapp.interceptors.RestTemplateHeaderModifierInterceptor; + @Configuration public class RestClientConfig { diff --git a/spring-rest/src/main/java/org/baeldung/config/WebConfig.java b/spring-rest/src/main/java/com/baeldung/sampleapp/config/WebConfig.java similarity index 95% rename from spring-rest/src/main/java/org/baeldung/config/WebConfig.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/config/WebConfig.java index b3e3cd179a..d5209a520b 100644 --- a/spring-rest/src/main/java/org/baeldung/config/WebConfig.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/config/WebConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.config; +package com.baeldung.sampleapp.config; import java.text.SimpleDateFormat; import java.util.List; @@ -18,7 +18,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; */ @Configuration @EnableWebMvc -@ComponentScan({ "org.baeldung.web" }) +@ComponentScan({ "com.baeldung.sampleapp.web" }) public class WebConfig implements WebMvcConfigurer { public WebConfig() { diff --git a/spring-rest/src/main/java/org/baeldung/interceptors/RestTemplateHeaderModifierInterceptor.java b/spring-rest/src/main/java/com/baeldung/sampleapp/interceptors/RestTemplateHeaderModifierInterceptor.java similarity index 91% rename from spring-rest/src/main/java/org/baeldung/interceptors/RestTemplateHeaderModifierInterceptor.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/interceptors/RestTemplateHeaderModifierInterceptor.java index fabb904634..519e5ebf0d 100644 --- a/spring-rest/src/main/java/org/baeldung/interceptors/RestTemplateHeaderModifierInterceptor.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/interceptors/RestTemplateHeaderModifierInterceptor.java @@ -1,4 +1,4 @@ -package org.baeldung.interceptors; +package com.baeldung.sampleapp.interceptors; import java.io.IOException; diff --git a/spring-rest/src/main/java/org/baeldung/repository/HeavyResourceRepository.java b/spring-rest/src/main/java/com/baeldung/sampleapp/repository/HeavyResourceRepository.java similarity index 72% rename from spring-rest/src/main/java/org/baeldung/repository/HeavyResourceRepository.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/repository/HeavyResourceRepository.java index e4eb6d8875..ea9541c31a 100644 --- a/spring-rest/src/main/java/org/baeldung/repository/HeavyResourceRepository.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/repository/HeavyResourceRepository.java @@ -1,10 +1,10 @@ -package org.baeldung.repository; - -import org.baeldung.web.dto.HeavyResource; -import org.baeldung.web.dto.HeavyResourceAddressOnly; +package com.baeldung.sampleapp.repository; import java.util.Map; +import com.baeldung.sampleapp.web.dto.HeavyResource; +import com.baeldung.sampleapp.web.dto.HeavyResourceAddressOnly; + public class HeavyResourceRepository { public void save(HeavyResource heavyResource) { diff --git a/spring-rest/src/main/java/org/baeldung/web/controller/BarMappingExamplesController.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/BarMappingExamplesController.java similarity index 96% rename from spring-rest/src/main/java/org/baeldung/web/controller/BarMappingExamplesController.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/BarMappingExamplesController.java index 1c3a1086ca..c6b8d23944 100644 --- a/spring-rest/src/main/java/org/baeldung/web/controller/BarMappingExamplesController.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/BarMappingExamplesController.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller; +package com.baeldung.sampleapp.web.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; diff --git a/spring-rest/src/main/java/org/baeldung/web/controller/CompanyController.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/CompanyController.java similarity index 82% rename from spring-rest/src/main/java/org/baeldung/web/controller/CompanyController.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/CompanyController.java index aa694c08ed..bfda2fe0d6 100644 --- a/spring-rest/src/main/java/org/baeldung/web/controller/CompanyController.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/CompanyController.java @@ -1,10 +1,11 @@ -package org.baeldung.web.controller; +package com.baeldung.sampleapp.web.controller; -import org.baeldung.web.dto.Company; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import com.baeldung.sampleapp.web.dto.Company; + @RestController public class CompanyController { diff --git a/spring-rest/src/main/java/org/baeldung/web/controller/DeferredResultController.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/DeferredResultController.java similarity index 98% rename from spring-rest/src/main/java/org/baeldung/web/controller/DeferredResultController.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/DeferredResultController.java index 5d039d2d02..8f4eb3218a 100644 --- a/spring-rest/src/main/java/org/baeldung/web/controller/DeferredResultController.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/DeferredResultController.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller; +package com.baeldung.sampleapp.web.controller; import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; diff --git a/spring-rest/src/main/java/org/baeldung/web/controller/HeavyResourceController.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/HeavyResourceController.java similarity index 88% rename from spring-rest/src/main/java/org/baeldung/web/controller/HeavyResourceController.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/HeavyResourceController.java index fed45066bd..8156fc14a9 100644 --- a/spring-rest/src/main/java/org/baeldung/web/controller/HeavyResourceController.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/HeavyResourceController.java @@ -1,11 +1,8 @@ -package org.baeldung.web.controller; +package com.baeldung.sampleapp.web.controller; import java.util.Map; -import org.baeldung.repository.HeavyResourceRepository; -import org.baeldung.web.dto.HeavyResource; -import org.baeldung.web.dto.HeavyResourceAddressOnly; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; @@ -14,6 +11,10 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; +import com.baeldung.sampleapp.repository.HeavyResourceRepository; +import com.baeldung.sampleapp.web.dto.HeavyResource; +import com.baeldung.sampleapp.web.dto.HeavyResourceAddressOnly; + @RestController public class HeavyResourceController { diff --git a/spring-rest/src/main/java/org/baeldung/web/controller/ItemController.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/ItemController.java similarity index 83% rename from spring-rest/src/main/java/org/baeldung/web/controller/ItemController.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/ItemController.java index 1cc3eae432..69bd458968 100644 --- a/spring-rest/src/main/java/org/baeldung/web/controller/ItemController.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/ItemController.java @@ -1,14 +1,14 @@ -package org.baeldung.web.controller; +package com.baeldung.sampleapp.web.controller; import java.util.Date; -import org.baeldung.web.dto.Item; -import org.baeldung.web.dto.ItemManager; -import org.baeldung.web.dto.Views; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import com.baeldung.sampleapp.web.dto.Item; +import com.baeldung.sampleapp.web.dto.ItemManager; +import com.baeldung.sampleapp.web.dto.Views; import com.fasterxml.jackson.annotation.JsonView; @RestController diff --git a/spring-rest/src/main/java/org/baeldung/web/controller/MyFooController.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/MyFooController.java similarity index 94% rename from spring-rest/src/main/java/org/baeldung/web/controller/MyFooController.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/MyFooController.java index 251e0b23e7..11ea5b70c9 100644 --- a/spring-rest/src/main/java/org/baeldung/web/controller/MyFooController.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/MyFooController.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller; +package com.baeldung.sampleapp.web.controller; import java.util.Collection; import java.util.HashMap; @@ -6,8 +6,6 @@ import java.util.Map; import javax.servlet.http.HttpServletResponse; -import org.baeldung.web.dto.Foo; -import org.baeldung.web.exception.ResourceNotFoundException; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; @@ -18,6 +16,9 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; +import com.baeldung.sampleapp.web.dto.Foo; +import com.baeldung.sampleapp.web.exception.ResourceNotFoundException; + @Controller @RequestMapping(value = "/foos") public class MyFooController { diff --git a/spring-rest/src/main/java/org/baeldung/web/controller/PactController.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/PactController.java similarity index 90% rename from spring-rest/src/main/java/org/baeldung/web/controller/PactController.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/PactController.java index 4f586479ef..0f5d7f1acb 100644 --- a/spring-rest/src/main/java/org/baeldung/web/controller/PactController.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/PactController.java @@ -1,9 +1,8 @@ -package org.baeldung.web.controller; +package com.baeldung.sampleapp.web.controller; import java.util.ArrayList; import java.util.List; -import org.baeldung.web.dto.PactDto; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; @@ -12,6 +11,8 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; +import com.baeldung.sampleapp.web.dto.PactDto; + @RestController public class PactController { diff --git a/spring-rest/src/main/java/org/baeldung/web/controller/SimplePostController.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/SimplePostController.java similarity index 97% rename from spring-rest/src/main/java/org/baeldung/web/controller/SimplePostController.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/SimplePostController.java index f8407acb47..7b57d35088 100644 --- a/spring-rest/src/main/java/org/baeldung/web/controller/SimplePostController.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/SimplePostController.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller; +package com.baeldung.sampleapp.web.controller; import java.io.BufferedOutputStream; import java.io.File; @@ -7,7 +7,6 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; -import org.baeldung.web.dto.Foo; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -15,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; +import com.baeldung.sampleapp.web.dto.Foo; + // used to test HttpClientPostingTest @RestController public class SimplePostController { diff --git a/spring-rest/src/main/java/org/baeldung/web/controller/advice/JsonpControllerAdvice.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/advice/JsonpControllerAdvice.java similarity index 85% rename from spring-rest/src/main/java/org/baeldung/web/controller/advice/JsonpControllerAdvice.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/advice/JsonpControllerAdvice.java index 996f229128..853e417d46 100644 --- a/spring-rest/src/main/java/org/baeldung/web/controller/advice/JsonpControllerAdvice.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/advice/JsonpControllerAdvice.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller.advice; +package com.baeldung.sampleapp.web.controller.advice; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.servlet.mvc.method.annotation.AbstractJsonpResponseBodyAdvice; diff --git a/spring-rest/src/main/java/org/baeldung/web/controller/mediatypes/CustomMediaTypeController.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/mediatypes/CustomMediaTypeController.java similarity index 85% rename from spring-rest/src/main/java/org/baeldung/web/controller/mediatypes/CustomMediaTypeController.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/mediatypes/CustomMediaTypeController.java index a0a6c6341e..fc73bade87 100644 --- a/spring-rest/src/main/java/org/baeldung/web/controller/mediatypes/CustomMediaTypeController.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/mediatypes/CustomMediaTypeController.java @@ -1,13 +1,14 @@ -package org.baeldung.web.controller.mediatypes; +package com.baeldung.sampleapp.web.controller.mediatypes; -import org.baeldung.web.dto.BaeldungItem; -import org.baeldung.web.dto.BaeldungItemV2; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; +import com.baeldung.sampleapp.web.dto.BaeldungItem; +import com.baeldung.sampleapp.web.dto.BaeldungItemV2; + @RestController @RequestMapping(value = "/", produces = "application/vnd.baeldung.api.v1+json") public class CustomMediaTypeController { diff --git a/spring-rest/src/main/java/org/baeldung/web/controller/redirect/RedirectController.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/redirect/RedirectController.java similarity index 98% rename from spring-rest/src/main/java/org/baeldung/web/controller/redirect/RedirectController.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/redirect/RedirectController.java index 59868593a3..321f3be3ef 100644 --- a/spring-rest/src/main/java/org/baeldung/web/controller/redirect/RedirectController.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/controller/redirect/RedirectController.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller.redirect; +package com.baeldung.sampleapp.web.controller.redirect; import javax.servlet.http.HttpServletRequest; diff --git a/spring-rest/src/main/java/org/baeldung/web/dto/BaeldungItem.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItem.java similarity index 83% rename from spring-rest/src/main/java/org/baeldung/web/dto/BaeldungItem.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItem.java index 9b3ecd33b9..807a254cfc 100644 --- a/spring-rest/src/main/java/org/baeldung/web/dto/BaeldungItem.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItem.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.sampleapp.web.dto; public class BaeldungItem { private final String itemId; diff --git a/spring-rest/src/main/java/org/baeldung/web/dto/BaeldungItemV2.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItemV2.java similarity index 84% rename from spring-rest/src/main/java/org/baeldung/web/dto/BaeldungItemV2.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItemV2.java index 64df20a14e..f84591ea43 100644 --- a/spring-rest/src/main/java/org/baeldung/web/dto/BaeldungItemV2.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItemV2.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.sampleapp.web.dto; public class BaeldungItemV2 { diff --git a/spring-rest/src/main/java/org/baeldung/web/dto/Company.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/Company.java similarity index 93% rename from spring-rest/src/main/java/org/baeldung/web/dto/Company.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/Company.java index 3164d604ad..6cfcc079d9 100644 --- a/spring-rest/src/main/java/org/baeldung/web/dto/Company.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/Company.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.sampleapp.web.dto; public class Company { diff --git a/spring-rest/src/main/java/org/baeldung/web/dto/Foo.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/Foo.java similarity index 94% rename from spring-rest/src/main/java/org/baeldung/web/dto/Foo.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/Foo.java index 240b368b50..186df8e678 100644 --- a/spring-rest/src/main/java/org/baeldung/web/dto/Foo.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/Foo.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.sampleapp.web.dto; import com.thoughtworks.xstream.annotations.XStreamAlias; diff --git a/spring-rest/src/main/java/org/baeldung/web/dto/HeavyResource.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResource.java similarity index 96% rename from spring-rest/src/main/java/org/baeldung/web/dto/HeavyResource.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResource.java index 934e76606f..2821341888 100644 --- a/spring-rest/src/main/java/org/baeldung/web/dto/HeavyResource.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResource.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.sampleapp.web.dto; public class HeavyResource { diff --git a/spring-rest/src/main/java/org/baeldung/web/dto/HeavyResourceAddressOnly.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressOnly.java similarity index 93% rename from spring-rest/src/main/java/org/baeldung/web/dto/HeavyResourceAddressOnly.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressOnly.java index f96347d60c..01ee6e7dd4 100644 --- a/spring-rest/src/main/java/org/baeldung/web/dto/HeavyResourceAddressOnly.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressOnly.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.sampleapp.web.dto; public class HeavyResourceAddressOnly { diff --git a/spring-rest/src/main/java/org/baeldung/web/dto/HeavyResourceAddressPartialUpdate.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressPartialUpdate.java similarity index 93% rename from spring-rest/src/main/java/org/baeldung/web/dto/HeavyResourceAddressPartialUpdate.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressPartialUpdate.java index f90f02ea08..1832a1a58b 100644 --- a/spring-rest/src/main/java/org/baeldung/web/dto/HeavyResourceAddressPartialUpdate.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressPartialUpdate.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.sampleapp.web.dto; public class HeavyResourceAddressPartialUpdate { diff --git a/spring-rest/src/main/java/org/baeldung/web/dto/Item.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/Item.java similarity index 94% rename from spring-rest/src/main/java/org/baeldung/web/dto/Item.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/Item.java index 536c72020f..a4fcef5dce 100644 --- a/spring-rest/src/main/java/org/baeldung/web/dto/Item.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/Item.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.sampleapp.web.dto; import com.fasterxml.jackson.annotation.JsonView; diff --git a/spring-rest/src/main/java/org/baeldung/web/dto/ItemManager.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/ItemManager.java similarity index 80% rename from spring-rest/src/main/java/org/baeldung/web/dto/ItemManager.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/ItemManager.java index 74ffada300..0009c0180b 100644 --- a/spring-rest/src/main/java/org/baeldung/web/dto/ItemManager.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/ItemManager.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.sampleapp.web.dto; public class ItemManager { diff --git a/spring-rest/src/main/java/org/baeldung/web/dto/PactDto.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/PactDto.java similarity index 93% rename from spring-rest/src/main/java/org/baeldung/web/dto/PactDto.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/PactDto.java index e34e2bdf3b..e184119611 100644 --- a/spring-rest/src/main/java/org/baeldung/web/dto/PactDto.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/PactDto.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.sampleapp.web.dto; public class PactDto { diff --git a/spring-rest/src/main/java/org/baeldung/web/dto/Views.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/Views.java similarity index 75% rename from spring-rest/src/main/java/org/baeldung/web/dto/Views.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/Views.java index 6231e12bcc..e2d83fda22 100644 --- a/spring-rest/src/main/java/org/baeldung/web/dto/Views.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/dto/Views.java @@ -1,4 +1,4 @@ -package org.baeldung.web.dto; +package com.baeldung.sampleapp.web.dto; public class Views { public static class Public { diff --git a/spring-rest/src/main/java/org/baeldung/web/exception/ResourceNotFoundException.java b/spring-rest/src/main/java/com/baeldung/sampleapp/web/exception/ResourceNotFoundException.java similarity index 82% rename from spring-rest/src/main/java/org/baeldung/web/exception/ResourceNotFoundException.java rename to spring-rest/src/main/java/com/baeldung/sampleapp/web/exception/ResourceNotFoundException.java index aab737b6ec..69532f196d 100644 --- a/spring-rest/src/main/java/org/baeldung/web/exception/ResourceNotFoundException.java +++ b/spring-rest/src/main/java/com/baeldung/sampleapp/web/exception/ResourceNotFoundException.java @@ -1,4 +1,4 @@ -package org.baeldung.web.exception; +package com.baeldung.sampleapp.web.exception; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; diff --git a/spring-rest/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-rest/src/test/java/com/baeldung/SpringContextIntegrationTest.java similarity index 91% rename from spring-rest/src/test/java/org/baeldung/SpringContextIntegrationTest.java rename to spring-rest/src/test/java/com/baeldung/SpringContextIntegrationTest.java index d99dacd331..e659897303 100644 --- a/spring-rest/src/test/java/org/baeldung/SpringContextIntegrationTest.java +++ b/spring-rest/src/test/java/com/baeldung/SpringContextIntegrationTest.java @@ -1,6 +1,5 @@ -package org.baeldung; +package com.baeldung; -import org.baeldung.config.MainApplication; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; @@ -10,6 +9,7 @@ import com.baeldung.custom.CustomApplication; import com.baeldung.produceimage.ImageApplication; import com.baeldung.propertyeditor.PropertyEditorApplication; import com.baeldung.responseheaders.ResponseHeadersApplication; +import com.baeldung.sampleapp.config.MainApplication; import com.baeldung.web.log.app.Application; @RunWith(SpringRunner.class) diff --git a/spring-rest/src/test/java/org/baeldung/client/Consts.java b/spring-rest/src/test/java/com/baeldung/client/Consts.java similarity index 68% rename from spring-rest/src/test/java/org/baeldung/client/Consts.java rename to spring-rest/src/test/java/com/baeldung/client/Consts.java index b40561d9c3..b392c4d199 100644 --- a/spring-rest/src/test/java/org/baeldung/client/Consts.java +++ b/spring-rest/src/test/java/com/baeldung/client/Consts.java @@ -1,4 +1,4 @@ -package org.baeldung.client; +package com.baeldung.client; public interface Consts { int APPLICATION_PORT = 8082; diff --git a/spring-rest/src/test/java/com/baeldung/controllers/ExamplePostControllerRequestIntegrationTest.java b/spring-rest/src/test/java/com/baeldung/controllers/ExamplePostControllerRequestIntegrationTest.java index 33926d6200..94b8bf40e7 100644 --- a/spring-rest/src/test/java/com/baeldung/controllers/ExamplePostControllerRequestIntegrationTest.java +++ b/spring-rest/src/test/java/com/baeldung/controllers/ExamplePostControllerRequestIntegrationTest.java @@ -1,5 +1,6 @@ package com.baeldung.controllers; +import com.baeldung.sampleapp.config.MainApplication; import com.baeldung.services.ExampleService; import com.baeldung.transfer.LoginForm; import org.junit.Before; @@ -12,7 +13,6 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.baeldung.config.MainApplication; import static org.mockito.Mockito.when; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; diff --git a/spring-rest/src/test/java/com/baeldung/controllers/ExamplePostControllerResponseIntegrationTest.java b/spring-rest/src/test/java/com/baeldung/controllers/ExamplePostControllerResponseIntegrationTest.java index 5c5e5c0a64..5743ad450b 100644 --- a/spring-rest/src/test/java/com/baeldung/controllers/ExamplePostControllerResponseIntegrationTest.java +++ b/spring-rest/src/test/java/com/baeldung/controllers/ExamplePostControllerResponseIntegrationTest.java @@ -1,5 +1,6 @@ package com.baeldung.controllers; +import com.baeldung.sampleapp.config.MainApplication; import com.baeldung.services.ExampleService; import com.baeldung.transfer.LoginForm; import org.junit.Before; @@ -19,7 +20,6 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import org.baeldung.config.MainApplication; @RunWith(SpringRunner.class) @SpringBootTest(classes = MainApplication.class) diff --git a/spring-rest/src/test/java/org/baeldung/okhttp/DefaultContentTypeInterceptor.java b/spring-rest/src/test/java/com/baeldung/okhttp/DefaultContentTypeInterceptor.java similarity index 92% rename from spring-rest/src/test/java/org/baeldung/okhttp/DefaultContentTypeInterceptor.java rename to spring-rest/src/test/java/com/baeldung/okhttp/DefaultContentTypeInterceptor.java index f49d7668e8..0450c1d6ba 100644 --- a/spring-rest/src/test/java/org/baeldung/okhttp/DefaultContentTypeInterceptor.java +++ b/spring-rest/src/test/java/com/baeldung/okhttp/DefaultContentTypeInterceptor.java @@ -1,4 +1,4 @@ -package org.baeldung.okhttp; +package com.baeldung.okhttp; import java.io.IOException; diff --git a/spring-rest/src/test/java/org/baeldung/okhttp/OkHttpFileUploadingLiveTest.java b/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpFileUploadingLiveTest.java similarity index 93% rename from spring-rest/src/test/java/org/baeldung/okhttp/OkHttpFileUploadingLiveTest.java rename to spring-rest/src/test/java/com/baeldung/okhttp/OkHttpFileUploadingLiveTest.java index 71fc755321..75980a5360 100644 --- a/spring-rest/src/test/java/org/baeldung/okhttp/OkHttpFileUploadingLiveTest.java +++ b/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpFileUploadingLiveTest.java @@ -1,6 +1,6 @@ -package org.baeldung.okhttp; +package com.baeldung.okhttp; -import static org.baeldung.client.Consts.APPLICATION_PORT; +import static com.baeldung.client.Consts.APPLICATION_PORT; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; diff --git a/spring-rest/src/test/java/org/baeldung/okhttp/OkHttpGetLiveTest.java b/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpGetLiveTest.java similarity index 92% rename from spring-rest/src/test/java/org/baeldung/okhttp/OkHttpGetLiveTest.java rename to spring-rest/src/test/java/com/baeldung/okhttp/OkHttpGetLiveTest.java index fc78899da1..3edd2eab06 100644 --- a/spring-rest/src/test/java/org/baeldung/okhttp/OkHttpGetLiveTest.java +++ b/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpGetLiveTest.java @@ -1,6 +1,6 @@ -package org.baeldung.okhttp; +package com.baeldung.okhttp; -import static org.baeldung.client.Consts.APPLICATION_PORT; +import static com.baeldung.client.Consts.APPLICATION_PORT; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; diff --git a/spring-rest/src/test/java/org/baeldung/okhttp/OkHttpHeaderLiveTest.java b/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpHeaderLiveTest.java similarity index 93% rename from spring-rest/src/test/java/org/baeldung/okhttp/OkHttpHeaderLiveTest.java rename to spring-rest/src/test/java/com/baeldung/okhttp/OkHttpHeaderLiveTest.java index c3dddc69e1..305c86d8c5 100644 --- a/spring-rest/src/test/java/org/baeldung/okhttp/OkHttpHeaderLiveTest.java +++ b/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpHeaderLiveTest.java @@ -1,4 +1,4 @@ -package org.baeldung.okhttp; +package com.baeldung.okhttp; import java.io.IOException; diff --git a/spring-rest/src/test/java/org/baeldung/okhttp/OkHttpMiscLiveTest.java b/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpMiscLiveTest.java similarity index 94% rename from spring-rest/src/test/java/org/baeldung/okhttp/OkHttpMiscLiveTest.java rename to spring-rest/src/test/java/com/baeldung/okhttp/OkHttpMiscLiveTest.java index 6ab485ee14..207ad14e71 100644 --- a/spring-rest/src/test/java/org/baeldung/okhttp/OkHttpMiscLiveTest.java +++ b/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpMiscLiveTest.java @@ -1,6 +1,6 @@ -package org.baeldung.okhttp; +package com.baeldung.okhttp; -import static org.baeldung.client.Consts.APPLICATION_PORT; +import static com.baeldung.client.Consts.APPLICATION_PORT; import java.io.File; import java.io.IOException; diff --git a/spring-rest/src/test/java/org/baeldung/okhttp/OkHttpPostingLiveTest.java b/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpPostingLiveTest.java similarity index 94% rename from spring-rest/src/test/java/org/baeldung/okhttp/OkHttpPostingLiveTest.java rename to spring-rest/src/test/java/com/baeldung/okhttp/OkHttpPostingLiveTest.java index d681a56822..66fee0b626 100644 --- a/spring-rest/src/test/java/org/baeldung/okhttp/OkHttpPostingLiveTest.java +++ b/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpPostingLiveTest.java @@ -1,6 +1,6 @@ -package org.baeldung.okhttp; +package com.baeldung.okhttp; -import static org.baeldung.client.Consts.APPLICATION_PORT; +import static com.baeldung.client.Consts.APPLICATION_PORT; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; diff --git a/spring-rest/src/test/java/org/baeldung/okhttp/OkHttpRedirectLiveTest.java b/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpRedirectLiveTest.java similarity index 92% rename from spring-rest/src/test/java/org/baeldung/okhttp/OkHttpRedirectLiveTest.java rename to spring-rest/src/test/java/com/baeldung/okhttp/OkHttpRedirectLiveTest.java index e3f567a693..5dd159c372 100644 --- a/spring-rest/src/test/java/org/baeldung/okhttp/OkHttpRedirectLiveTest.java +++ b/spring-rest/src/test/java/com/baeldung/okhttp/OkHttpRedirectLiveTest.java @@ -1,4 +1,4 @@ -package org.baeldung.okhttp; +package com.baeldung.okhttp; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; diff --git a/spring-rest/src/test/java/org/baeldung/okhttp/ProgressRequestWrapper.java b/spring-rest/src/test/java/com/baeldung/okhttp/ProgressRequestWrapper.java similarity index 94% rename from spring-rest/src/test/java/org/baeldung/okhttp/ProgressRequestWrapper.java rename to spring-rest/src/test/java/com/baeldung/okhttp/ProgressRequestWrapper.java index 04a2fcc6e7..6f0ebce1e1 100644 --- a/spring-rest/src/test/java/org/baeldung/okhttp/ProgressRequestWrapper.java +++ b/spring-rest/src/test/java/com/baeldung/okhttp/ProgressRequestWrapper.java @@ -1,4 +1,4 @@ -package org.baeldung.okhttp; +package com.baeldung.okhttp; import okhttp3.RequestBody; import okhttp3.MediaType; diff --git a/spring-rest/src/test/java/org/baeldung/pact/PactProviderLiveTest.java b/spring-rest/src/test/java/com/baeldung/pact/PactProviderLiveTest.java similarity index 93% rename from spring-rest/src/test/java/org/baeldung/pact/PactProviderLiveTest.java rename to spring-rest/src/test/java/com/baeldung/pact/PactProviderLiveTest.java index f020fb88db..7ac9c1d9ce 100644 --- a/spring-rest/src/test/java/org/baeldung/pact/PactProviderLiveTest.java +++ b/spring-rest/src/test/java/com/baeldung/pact/PactProviderLiveTest.java @@ -1,11 +1,12 @@ -package org.baeldung.pact; +package com.baeldung.pact; -import org.baeldung.config.MainApplication; import org.junit.BeforeClass; import org.junit.runner.RunWith; import org.springframework.boot.SpringApplication; import org.springframework.web.context.ConfigurableWebApplicationContext; +import com.baeldung.sampleapp.config.MainApplication; + import au.com.dius.pact.provider.junit.PactRunner; import au.com.dius.pact.provider.junit.Provider; import au.com.dius.pact.provider.junit.State; diff --git a/spring-rest/src/test/java/org/baeldung/resttemplate/RestTemplateLiveTest.java b/spring-rest/src/test/java/com/baeldung/resttemplate/RestTemplateLiveTest.java similarity index 94% rename from spring-rest/src/test/java/org/baeldung/resttemplate/RestTemplateLiveTest.java rename to spring-rest/src/test/java/com/baeldung/resttemplate/RestTemplateLiveTest.java index 4f00bebdf4..8db31fd0a7 100644 --- a/spring-rest/src/test/java/org/baeldung/resttemplate/RestTemplateLiveTest.java +++ b/spring-rest/src/test/java/com/baeldung/resttemplate/RestTemplateLiveTest.java @@ -1,10 +1,9 @@ -package org.baeldung.resttemplate; +package com.baeldung.resttemplate; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; -import org.baeldung.config.RestClientConfig; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -17,6 +16,7 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.web.client.RestTemplate; +import com.baeldung.sampleapp.config.RestClientConfig; import com.baeldung.transfer.LoginForm; @RunWith(SpringJUnit4ClassRunner.class) diff --git a/spring-rest/src/test/java/org/baeldung/uribuilder/SpringUriBuilderIntegrationTest.java b/spring-rest/src/test/java/com/baeldung/uribuilder/SpringUriBuilderIntegrationTest.java similarity index 98% rename from spring-rest/src/test/java/org/baeldung/uribuilder/SpringUriBuilderIntegrationTest.java rename to spring-rest/src/test/java/com/baeldung/uribuilder/SpringUriBuilderIntegrationTest.java index bdc24f7f34..0af5cb1e1a 100644 --- a/spring-rest/src/test/java/org/baeldung/uribuilder/SpringUriBuilderIntegrationTest.java +++ b/spring-rest/src/test/java/com/baeldung/uribuilder/SpringUriBuilderIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.uribuilder; +package com.baeldung.uribuilder; import static org.junit.Assert.assertEquals; diff --git a/spring-rest/src/test/java/org/baeldung/web/controller/HeavyResourceControllerIntegrationTest.java b/spring-rest/src/test/java/com/baeldung/web/controller/HeavyResourceControllerIntegrationTest.java similarity index 92% rename from spring-rest/src/test/java/org/baeldung/web/controller/HeavyResourceControllerIntegrationTest.java rename to spring-rest/src/test/java/com/baeldung/web/controller/HeavyResourceControllerIntegrationTest.java index 478e4948dc..5a0b08958e 100644 --- a/spring-rest/src/test/java/org/baeldung/web/controller/HeavyResourceControllerIntegrationTest.java +++ b/spring-rest/src/test/java/com/baeldung/web/controller/HeavyResourceControllerIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller; +package com.baeldung.web.controller; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.patch; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put; @@ -6,9 +6,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. import java.util.HashMap; -import org.baeldung.config.WebConfig; -import org.baeldung.web.dto.HeavyResource; -import org.baeldung.web.dto.HeavyResourceAddressOnly; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -21,6 +18,9 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import com.baeldung.sampleapp.config.WebConfig; +import com.baeldung.sampleapp.web.dto.HeavyResource; +import com.baeldung.sampleapp.web.dto.HeavyResourceAddressOnly; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/spring-rest/src/test/java/org/baeldung/web/controller/mediatypes/CustomMediaTypeControllerIntegrationTest.java b/spring-rest/src/test/java/com/baeldung/web/controller/mediatypes/CustomMediaTypeControllerIntegrationTest.java similarity index 94% rename from spring-rest/src/test/java/org/baeldung/web/controller/mediatypes/CustomMediaTypeControllerIntegrationTest.java rename to spring-rest/src/test/java/com/baeldung/web/controller/mediatypes/CustomMediaTypeControllerIntegrationTest.java index 9ef2dfa215..7b695cd23b 100644 --- a/spring-rest/src/test/java/org/baeldung/web/controller/mediatypes/CustomMediaTypeControllerIntegrationTest.java +++ b/spring-rest/src/test/java/com/baeldung/web/controller/mediatypes/CustomMediaTypeControllerIntegrationTest.java @@ -1,6 +1,5 @@ -package org.baeldung.web.controller.mediatypes; +package com.baeldung.web.controller.mediatypes; -import org.baeldung.config.WebConfig; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -12,6 +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.sampleapp.config.WebConfig; + import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; diff --git a/spring-rest/src/test/java/org/baeldung/web/controller/mediatypes/CustomMediaTypeControllerLiveTest.java b/spring-rest/src/test/java/com/baeldung/web/controller/mediatypes/CustomMediaTypeControllerLiveTest.java similarity index 96% rename from spring-rest/src/test/java/org/baeldung/web/controller/mediatypes/CustomMediaTypeControllerLiveTest.java rename to spring-rest/src/test/java/com/baeldung/web/controller/mediatypes/CustomMediaTypeControllerLiveTest.java index 2b57e7049c..e48edc723c 100644 --- a/spring-rest/src/test/java/org/baeldung/web/controller/mediatypes/CustomMediaTypeControllerLiveTest.java +++ b/spring-rest/src/test/java/com/baeldung/web/controller/mediatypes/CustomMediaTypeControllerLiveTest.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller.mediatypes; +package com.baeldung.web.controller.mediatypes; import io.restassured.http.ContentType; import org.junit.Test; diff --git a/spring-rest/src/test/java/org/baeldung/web/controller/mediatypes/TestConfig.java b/spring-rest/src/test/java/com/baeldung/web/controller/mediatypes/TestConfig.java similarity index 81% rename from spring-rest/src/test/java/org/baeldung/web/controller/mediatypes/TestConfig.java rename to spring-rest/src/test/java/com/baeldung/web/controller/mediatypes/TestConfig.java index 66ffe4947d..7fc7f17e50 100644 --- a/spring-rest/src/test/java/org/baeldung/web/controller/mediatypes/TestConfig.java +++ b/spring-rest/src/test/java/com/baeldung/web/controller/mediatypes/TestConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller.mediatypes; +package com.baeldung.web.controller.mediatypes; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; diff --git a/spring-rest/src/test/java/org/baeldung/web/controller/redirect/RedirectControllerIntegrationTest.java b/spring-rest/src/test/java/com/baeldung/web/controller/redirect/RedirectControllerIntegrationTest.java similarity index 98% rename from spring-rest/src/test/java/org/baeldung/web/controller/redirect/RedirectControllerIntegrationTest.java rename to spring-rest/src/test/java/com/baeldung/web/controller/redirect/RedirectControllerIntegrationTest.java index c604db596a..745f7d5a31 100644 --- a/spring-rest/src/test/java/org/baeldung/web/controller/redirect/RedirectControllerIntegrationTest.java +++ b/spring-rest/src/test/java/com/baeldung/web/controller/redirect/RedirectControllerIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.web.controller.redirect; +package com.baeldung.web.controller.redirect; import static org.hamcrest.CoreMatchers.equalTo; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; diff --git a/spring-rest/src/test/resources/cache/2d9345a30d2cc31bb3091d70a8ef6c18.0 b/spring-rest/src/test/resources/cache/2d9345a30d2cc31bb3091d70a8ef6c18.0 index bc64f40e5d..e6cfcabe71 100644 --- a/spring-rest/src/test/resources/cache/2d9345a30d2cc31bb3091d70a8ef6c18.0 +++ b/spring-rest/src/test/resources/cache/2d9345a30d2cc31bb3091d70a8ef6c18.0 @@ -8,7 +8,7 @@ Content-Length: 1759 Connection: keep-alive Accept-Ranges: bytes Server: nginx/1.10.0 (Ubuntu) -Date: Sat, 28 Apr 2018 20:53:35 GMT +Date: Sat, 08 Dec 2018 13:02:07 GMT Last-Modified: Tue, 27 May 2014 02:35:47 GMT ETag: "5383fa03-6df" OkHttp-Sent-Millis: 1489054646765 diff --git a/spring-rest/src/test/resources/cache/4b217e04ba52215f3a6b64d28f6729c6.0 b/spring-rest/src/test/resources/cache/4b217e04ba52215f3a6b64d28f6729c6.0 index bbd34c75f6..85fc22d658 100644 --- a/spring-rest/src/test/resources/cache/4b217e04ba52215f3a6b64d28f6729c6.0 +++ b/spring-rest/src/test/resources/cache/4b217e04ba52215f3a6b64d28f6729c6.0 @@ -4,10 +4,10 @@ GET HTTP/1.1 301 Moved Permanently 8 Server: nginx/1.10.0 (Ubuntu) -Date: Sat, 28 Apr 2018 20:53:33 GMT +Date: Sat, 08 Dec 2018 13:02:04 GMT Content-Type: text/html Content-Length: 194 Connection: keep-alive Location: https://publicobject.com/helloworld.txt -OkHttp-Sent-Millis: 1524948815122 -OkHttp-Received-Millis: 1524948815342 +OkHttp-Sent-Millis: 1544274128028 +OkHttp-Received-Millis: 1544274128386 diff --git a/spring-rest/src/test/resources/cache/journal b/spring-rest/src/test/resources/cache/journal index eed030a85d..a139399103 100644 --- a/spring-rest/src/test/resources/cache/journal +++ b/spring-rest/src/test/resources/cache/journal @@ -67,3 +67,9 @@ CLEAN 4b217e04ba52215f3a6b64d28f6729c6 333 194 READ 2d9345a30d2cc31bb3091d70a8ef6c18 DIRTY 2d9345a30d2cc31bb3091d70a8ef6c18 CLEAN 2d9345a30d2cc31bb3091d70a8ef6c18 7618 1759 +READ 4b217e04ba52215f3a6b64d28f6729c6 +DIRTY 4b217e04ba52215f3a6b64d28f6729c6 +CLEAN 4b217e04ba52215f3a6b64d28f6729c6 333 194 +READ 2d9345a30d2cc31bb3091d70a8ef6c18 +DIRTY 2d9345a30d2cc31bb3091d70a8ef6c18 +CLEAN 2d9345a30d2cc31bb3091d70a8ef6c18 7618 1759