Merge pull request #5903 from rozagerardo/geroza/BAEL-10845_subtask-part-1_BAEL-10354_migrateparent-boot-to-spring-boot-2.1_part-3
[BAEL-10845] | Upgrade set of modules to use boot 2.1 - part 3
This commit is contained in:
commit
76e8d10bc3
@ -1,2 +0,0 @@
|
|||||||
This pom will be ued only temporary until we migrate parent-boot-2 to 2.1.0 for ticket BAEL-10354
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
<description>Temporary Parent for all Spring Boot 2.0.x modules</description>
|
|
||||||
<!-- This pom will be ued only temporary until we migrate parent-boot-2 to 2.1.0 for ticket BAEL-10354 -->
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>com.baeldung</groupId>
|
|
||||||
<artifactId>parent-modules</artifactId>
|
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-dependencies</artifactId>
|
|
||||||
<version>${spring-boot.version}</version>
|
|
||||||
<type>pom</type>
|
|
||||||
<scope>import</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.rest-assured</groupId>
|
|
||||||
<artifactId>rest-assured</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
<version>${spring-boot.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<mainClass>${start-class}</mainClass>
|
|
||||||
<!-- this is necessary as we're not using the Boot parent -->
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</pluginManagement>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>thin-jar</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
<dependencies>
|
|
||||||
<!-- The following enables the "thin jar" deployment option. -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot.experimental</groupId>
|
|
||||||
<artifactId>spring-boot-thin-layout</artifactId>
|
|
||||||
<version>${thin.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
<properties>
|
|
||||||
<rest-assured.version>3.1.0</rest-assured.version>
|
|
||||||
<!-- plugins -->
|
|
||||||
<thin.version>1.0.11.RELEASE</thin.version>
|
|
||||||
<spring-boot.version>2.0.5.RELEASE</spring-boot.version>
|
|
||||||
</properties>
|
|
||||||
</project>
|
|
||||||
|
|
||||||
|
|
6
pom.xml
6
pom.xml
@ -324,7 +324,6 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>parent-boot-1</module>
|
<module>parent-boot-1</module>
|
||||||
<module>parent-boot-2</module>
|
<module>parent-boot-2</module>
|
||||||
<module>parent-boot-2.0-temp</module>
|
|
||||||
<module>parent-spring-4</module>
|
<module>parent-spring-4</module>
|
||||||
<module>parent-spring-5</module>
|
<module>parent-spring-5</module>
|
||||||
<module>parent-java</module>
|
<module>parent-java</module>
|
||||||
@ -590,7 +589,6 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>parent-boot-1</module>
|
<module>parent-boot-1</module>
|
||||||
<module>parent-boot-2</module>
|
<module>parent-boot-2</module>
|
||||||
<module>parent-boot-2.0-temp</module>
|
|
||||||
<module>parent-spring-4</module>
|
<module>parent-spring-4</module>
|
||||||
<module>parent-spring-5</module>
|
<module>parent-spring-5</module>
|
||||||
<module>parent-java</module>
|
<module>parent-java</module>
|
||||||
@ -985,7 +983,6 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>parent-boot-1</module>
|
<module>parent-boot-1</module>
|
||||||
<module>parent-boot-2</module>
|
<module>parent-boot-2</module>
|
||||||
<module>parent-boot-2.0-temp</module>
|
|
||||||
<module>parent-spring-4</module>
|
<module>parent-spring-4</module>
|
||||||
<module>parent-spring-5</module>
|
<module>parent-spring-5</module>
|
||||||
<module>parent-java</module>
|
<module>parent-java</module>
|
||||||
@ -1038,7 +1035,6 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>parent-boot-1</module>
|
<module>parent-boot-1</module>
|
||||||
<module>parent-boot-2</module>
|
<module>parent-boot-2</module>
|
||||||
<module>parent-boot-2.0-temp</module>
|
|
||||||
<module>parent-spring-4</module>
|
<module>parent-spring-4</module>
|
||||||
<module>parent-spring-5</module>
|
<module>parent-spring-5</module>
|
||||||
<module>parent-java</module>
|
<module>parent-java</module>
|
||||||
@ -1300,7 +1296,6 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>parent-boot-1</module>
|
<module>parent-boot-1</module>
|
||||||
<module>parent-boot-2</module>
|
<module>parent-boot-2</module>
|
||||||
<module>parent-boot-2.0-temp</module>
|
|
||||||
<module>parent-spring-4</module>
|
<module>parent-spring-4</module>
|
||||||
<module>parent-spring-5</module>
|
<module>parent-spring-5</module>
|
||||||
<module>parent-java</module>
|
<module>parent-java</module>
|
||||||
@ -1536,7 +1531,6 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>parent-boot-1</module>
|
<module>parent-boot-1</module>
|
||||||
<module>parent-boot-2</module>
|
<module>parent-boot-2</module>
|
||||||
<module>parent-boot-2.0-temp</module>
|
|
||||||
<module>parent-spring-4</module>
|
<module>parent-spring-4</module>
|
||||||
<module>parent-spring-5</module>
|
<module>parent-spring-5</module>
|
||||||
<module>parent-java</module>
|
<module>parent-java</module>
|
||||||
|
@ -2,3 +2,4 @@
|
|||||||
|
|
||||||
- [Session Attributes in Spring MVC](http://www.baeldung.com/spring-mvc-session-attributes)
|
- [Session Attributes in Spring MVC](http://www.baeldung.com/spring-mvc-session-attributes)
|
||||||
- [Binding a List in Thymeleaf](http://www.baeldung.com/thymeleaf-list)
|
- [Binding a List in Thymeleaf](http://www.baeldung.com/thymeleaf-list)
|
||||||
|
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
<description>spring forms examples using thymeleaf</description>
|
<description>spring forms examples using thymeleaf</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -6,12 +6,12 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
import org.springframework.web.filter.ShallowEtagHeaderFilter;
|
import org.springframework.web.filter.ShallowEtagHeaderFilter;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableAutoConfiguration
|
@EnableAutoConfiguration
|
||||||
@Import(PersistenceConfig.class)
|
@Import(PersistenceConfig.class)
|
||||||
public class Application extends WebMvcConfigurerAdapter {
|
public class Application implements WebMvcConfigurer {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(Application.class, args);
|
SpringApplication.run(Application.class, args);
|
||||||
|
@ -1,62 +1,66 @@
|
|||||||
package org.baeldung.web.service;
|
package org.baeldung.web.service;
|
||||||
|
|
||||||
|
import static io.restassured.RestAssured.given;
|
||||||
|
import static org.hamcrest.core.Is.is;
|
||||||
|
import static org.hamcrest.core.IsCollectionContaining.hasItems;
|
||||||
|
import static org.hamcrest.core.IsEqual.equalTo;
|
||||||
|
|
||||||
import org.apache.commons.lang3.RandomStringUtils;
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
import org.baeldung.web.main.Application;
|
import org.baeldung.web.main.Application;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||||
|
import org.springframework.boot.web.server.LocalServerPort;
|
||||||
import org.springframework.test.context.junit4.SpringRunner;
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
|
||||||
import static io.restassured.RestAssured.given;
|
|
||||||
import static org.hamcrest.core.Is.is;
|
|
||||||
import static org.hamcrest.core.IsCollectionContaining.hasItems;
|
|
||||||
import static org.hamcrest.core.IsEqual.equalTo;
|
|
||||||
|
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.DEFINED_PORT)
|
@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.RANDOM_PORT)
|
||||||
public class StudentServiceIntegrationTest {
|
public class StudentServiceIntegrationTest {
|
||||||
|
|
||||||
private static final String ENDPOINT = "http://localhost:8080/student/get";
|
@LocalServerPort
|
||||||
|
int port;
|
||||||
|
|
||||||
|
private static final String ENDPOINT = "http://localhost:%s/student/get";
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenRequestForStudents_whenPageIsOne_expectContainsNames() {
|
public void givenRequestForStudents_whenPageIsOne_expectContainsNames() {
|
||||||
given().params("page", "0", "size", "2").get(ENDPOINT).then().assertThat()
|
given().params("page", "0", "size", "2").get(String.format(ENDPOINT, port)).then().assertThat()
|
||||||
.body("content.name", hasItems("Bryan", "Ben"));
|
.body("content.name", hasItems("Bryan", "Ben"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenRequestForStudents_whenSizeIsTwo_expectTwoItems() {
|
public void givenRequestForStudents_whenSizeIsTwo_expectTwoItems() {
|
||||||
given().params("page", "0", "size", "2").get(ENDPOINT).then().assertThat().body("size", equalTo(2));
|
given().params("page", "0", "size", "2").get(String.format(ENDPOINT, port)).then().assertThat().body("size", equalTo(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenRequestForStudents_whenSizeIsTwo_expectNumberOfElementsTwo() {
|
public void givenRequestForStudents_whenSizeIsTwo_expectNumberOfElementsTwo() {
|
||||||
given().params("page", "0", "size", "2").get(ENDPOINT).then().assertThat().body("numberOfElements", equalTo(2));
|
given().params("page", "0", "size", "2").get(String.format(ENDPOINT, port)).then().assertThat().body("numberOfElements", equalTo(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenRequestForStudents_whenResourcesAreRetrievedPaged_thenExpect200() {
|
public void givenRequestForStudents_whenResourcesAreRetrievedPaged_thenExpect200() {
|
||||||
given().params("page", "0", "size", "2").get(ENDPOINT).then().statusCode(200);
|
given().params("page", "0", "size", "2").get(String.format(ENDPOINT, port)).then().statusCode(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenRequestForStudents_whenPageOfResourcesAreRetrievedOutOfBounds_thenExpect500() {
|
public void givenRequestForStudents_whenPageOfResourcesAreRetrievedOutOfBounds_thenExpect500() {
|
||||||
given().params("page", "1000", "size", "2").get(ENDPOINT).then().statusCode(500);
|
given().params("page", "1000", "size", "2").get(String.format(ENDPOINT, port)).then().statusCode(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenRequestForStudents_whenPageNotValid_thenExpect500() {
|
public void givenRequestForStudents_whenPageNotValid_thenExpect500() {
|
||||||
given().params("page", RandomStringUtils.randomNumeric(5), "size", "2").get(ENDPOINT).then().statusCode(500);
|
given().params("page", RandomStringUtils.randomNumeric(5), "size", "2").get(String.format(ENDPOINT, port)).then().statusCode(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenRequestForStudents_whenPageSizeIsFive_expectFiveItems() {
|
public void givenRequestForStudents_whenPageSizeIsFive_expectFiveItems() {
|
||||||
given().params("page", "0", "size", "5").get(ENDPOINT).then().body("content.size()", is(5));
|
given().params("page", "0", "size", "5").get(String.format(ENDPOINT, port)).then().body("content.size()", is(5));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenResourcesExist_whenFirstPageIsRetrieved_thenPageContainsResources() {
|
public void givenResourcesExist_whenFirstPageIsRetrieved_thenPageContainsResources() {
|
||||||
given().params("page", "0", "size", "2").get(ENDPOINT).then().assertThat().body("first", equalTo(true));
|
given().params("page", "0", "size", "2").get(String.format(ENDPOINT, port)).then().assertThat().body("first", equalTo(true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
<description>A simple project to demonstrate Spring REST Shell features.</description>
|
<description>A simple project to demonstrate Spring REST Shell features.</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -43,7 +43,7 @@ public class EmployeeClient
|
|||||||
|
|
||||||
ResponseEntity<List<Employee>> response =
|
ResponseEntity<List<Employee>> response =
|
||||||
restTemplate.exchange(
|
restTemplate.exchange(
|
||||||
"http://localhost:8080/spring-rest/employees/",
|
"http://localhost:8082/spring-rest/employees/",
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
null,
|
null,
|
||||||
new ParameterizedTypeReference<List<Employee>>(){});
|
new ParameterizedTypeReference<List<Employee>>(){});
|
||||||
@ -61,7 +61,7 @@ public class EmployeeClient
|
|||||||
|
|
||||||
EmployeeList response =
|
EmployeeList response =
|
||||||
restTemplate.getForObject(
|
restTemplate.getForObject(
|
||||||
"http://localhost:8080/spring-rest/employees/v2",
|
"http://localhost:8082/spring-rest/employees/v2",
|
||||||
EmployeeList.class);
|
EmployeeList.class);
|
||||||
|
|
||||||
List<Employee> employees = response.getEmployees();
|
List<Employee> employees = response.getEmployees();
|
||||||
@ -80,7 +80,7 @@ public class EmployeeClient
|
|||||||
newEmployees.add(new Employee(4, "CEO"));
|
newEmployees.add(new Employee(4, "CEO"));
|
||||||
|
|
||||||
restTemplate.postForObject(
|
restTemplate.postForObject(
|
||||||
"http://localhost:8080/spring-rest/employees/",
|
"http://localhost:8082/spring-rest/employees/",
|
||||||
newEmployees,
|
newEmployees,
|
||||||
ResponseEntity.class);
|
ResponseEntity.class);
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ public class EmployeeClient
|
|||||||
newEmployees.add(new Employee(4, "CEO"));
|
newEmployees.add(new Employee(4, "CEO"));
|
||||||
|
|
||||||
restTemplate.postForObject(
|
restTemplate.postForObject(
|
||||||
"http://localhost:8080/spring-rest/employees/v2/",
|
"http://localhost:8082/spring-rest/employees/v2/",
|
||||||
new EmployeeList(newEmployees),
|
new EmployeeList(newEmployees),
|
||||||
ResponseEntity.class);
|
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
|
@EnableAutoConfiguration
|
||||||
@ComponentScan("com.baeldung.web.upload")
|
@ComponentScan("com.baeldung.web.upload")
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class Application extends SpringBootServletInitializer {
|
public class UploadApplication extends SpringBootServletInitializer {
|
||||||
|
|
||||||
public static void main(final String[] args) {
|
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)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest(classes = { CustomApplication.class, ImageApplication.class, PropertyEditorApplication.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})
|
MainApplication.class})
|
||||||
public class SpringContextIntegrationTest {
|
public class SpringContextIntegrationTest {
|
||||||
|
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -11,10 +11,10 @@
|
|||||||
<description>Spring Security MVC Boot</description>
|
<description>Spring Security MVC Boot</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.thymeleaf.extras</groupId>
|
<groupId>org.thymeleaf.extras</groupId>
|
||||||
<artifactId>thymeleaf-extras-springsecurity4</artifactId>
|
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
|
||||||
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
|
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
|
||||||
<head>
|
<head>
|
||||||
<title>Private</title>
|
<title>Private</title>
|
||||||
</head>
|
</head>
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
<description>Spring OpenID sample project</description>
|
<description>Spring OpenID sample project</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<rest-assured.version>3.1.0</rest-assured.version>
|
<rest-assured.version>3.1.0</rest-assured.version>
|
||||||
<oauth.version>2.3.3.RELEASE</oauth.version>
|
<oauth.version>2.3.3.RELEASE</oauth.version>
|
||||||
<oauth-auto.version>2.0.1.RELEASE</oauth-auto.version>
|
<oauth-auto.version>2.1.1.RELEASE</oauth-auto.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.thymeleaf.extras</groupId>
|
<groupId>org.thymeleaf.extras</groupId>
|
||||||
<artifactId>thymeleaf-extras-springsecurity4</artifactId>
|
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.thymeleaf.extras</groupId>
|
<groupId>org.thymeleaf.extras</groupId>
|
||||||
<artifactId>thymeleaf-extras-springsecurity4</artifactId>
|
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -11,10 +11,10 @@
|
|||||||
<description>Spring Security with Thymeleaf tutorial</description>
|
<description>Spring Security with Thymeleaf tutorial</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -43,7 +43,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.thymeleaf.extras</groupId>
|
<groupId>org.thymeleaf.extras</groupId>
|
||||||
<artifactId>thymeleaf-extras-springsecurity4</artifactId>
|
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../../parent-boot-2.0-temp</relativePath>
|
<relativePath>../../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
<description>Spring Vault sample project</description>
|
<description>Spring Vault sample project</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -41,27 +41,8 @@
|
|||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>${maven-surefire-plugin.version}</version>
|
|
||||||
<configuration>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/*IntegrationTest.java</exclude>
|
|
||||||
</excludes>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<spring.vault.core.version>2.0.1.RELEASE</spring.vault.core.version>
|
<spring.vault.core.version>2.1.1.RELEASE</spring.vault.core.version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
@ -11,10 +11,10 @@
|
|||||||
<description>Spring WebFlux AMQP Sample</description>
|
<description>Spring WebFlux AMQP Sample</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
spring:
|
spring:
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
host: 192.168.99.100
|
host: localhost
|
||||||
port: 5672
|
port: 5672
|
||||||
username: guest
|
username: guest
|
||||||
password: guest
|
password: guest
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
<name>Vaadin</name>
|
<name>Vaadin</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
|
2
vaadin/src/main/resources/application.properties
Normal file
2
vaadin/src/main/resources/application.properties
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#Vaadin supports spring-boot 2.1 properly from V8 onwards (according to this comment https://github.com/vaadin/spring/issues/331#issuecomment-435128475)
|
||||||
|
spring.main.allow-bean-definition-overriding=true
|
@ -7,10 +7,10 @@
|
|||||||
<name>vavr</name>
|
<name>vavr</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-boot-2.0-temp</artifactId>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../parent-boot-2.0-temp</relativePath>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user