Migrated modules to parent-boot-2 usign spring-boot 2.1:
spring-mvc-forms-thymeleaf spring-rest spring-rest-angular spring-rest-query-language spring-rest-shell spring-rest-simple spring-rest-template spring-resttemplate spring-security-mvc-boot spring-security-openid spring-security-sso spring-security-thymeleaf
This commit is contained in:
@@ -43,7 +43,7 @@ public class EmployeeClient
|
||||
|
||||
ResponseEntity<List<Employee>> response =
|
||||
restTemplate.exchange(
|
||||
"http://localhost:8080/spring-rest/employees/",
|
||||
"http://localhost:8082/spring-rest/employees/",
|
||||
HttpMethod.GET,
|
||||
null,
|
||||
new ParameterizedTypeReference<List<Employee>>(){});
|
||||
@@ -61,7 +61,7 @@ public class EmployeeClient
|
||||
|
||||
EmployeeList response =
|
||||
restTemplate.getForObject(
|
||||
"http://localhost:8080/spring-rest/employees/v2",
|
||||
"http://localhost:8082/spring-rest/employees/v2",
|
||||
EmployeeList.class);
|
||||
|
||||
List<Employee> employees = response.getEmployees();
|
||||
@@ -80,7 +80,7 @@ public class EmployeeClient
|
||||
newEmployees.add(new Employee(4, "CEO"));
|
||||
|
||||
restTemplate.postForObject(
|
||||
"http://localhost:8080/spring-rest/employees/",
|
||||
"http://localhost:8082/spring-rest/employees/",
|
||||
newEmployees,
|
||||
ResponseEntity.class);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public class EmployeeClient
|
||||
newEmployees.add(new Employee(4, "CEO"));
|
||||
|
||||
restTemplate.postForObject(
|
||||
"http://localhost:8080/spring-rest/employees/v2/",
|
||||
"http://localhost:8082/spring-rest/employees/v2/",
|
||||
new EmployeeList(newEmployees),
|
||||
ResponseEntity.class);
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.baeldung.sampleapp.web.controller.advice;
|
||||
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.AbstractJsonpResponseBodyAdvice;
|
||||
|
||||
@ControllerAdvice
|
||||
public class JsonpControllerAdvice extends AbstractJsonpResponseBodyAdvice {
|
||||
|
||||
public JsonpControllerAdvice() {
|
||||
super("callback");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,9 +9,9 @@ import org.springframework.context.annotation.ComponentScan;
|
||||
@EnableAutoConfiguration
|
||||
@ComponentScan("com.baeldung.web.upload")
|
||||
@SpringBootApplication
|
||||
public class Application extends SpringBootServletInitializer {
|
||||
public class UploadApplication extends SpringBootServletInitializer {
|
||||
|
||||
public static void main(final String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
SpringApplication.run(UploadApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ import com.baeldung.web.log.app.Application;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = { CustomApplication.class, ImageApplication.class, PropertyEditorApplication.class,
|
||||
ResponseHeadersApplication.class, Application.class, com.baeldung.web.upload.app.Application.class,
|
||||
ResponseHeadersApplication.class, Application.class, com.baeldung.web.upload.app.UploadApplication.class,
|
||||
MainApplication.class})
|
||||
public class SpringContextIntegrationTest {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user