Skip to content

Commit bae8465

Browse files
authored
Merge pull request eugenp#5874 from rozagerardo/geroza/BAEL-10844_subtask-part-1_BAEL-10354_migrateparent-boot-to-spring-boot-2.1_part-2
[BAEL-10844] | Upgrade set of modules to use boot 2.1 - part 2
2 parents 5aff058 + 24d6fe7 commit bae8465

File tree

26 files changed

+106
-75
lines changed

26 files changed

+106
-75
lines changed

spring-boot-autoconfiguration/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
<description>This is simple boot application demonstrating a custom auto-configuration</description>
1010

1111
<parent>
12-
<artifactId>parent-boot-2.0-temp</artifactId>
12+
<artifactId>parent-boot-2</artifactId>
1313
<groupId>com.baeldung</groupId>
1414
<version>0.0.1-SNAPSHOT</version>
15-
<relativePath>../parent-boot-2.0-temp</relativePath>
15+
<relativePath>../parent-boot-2</relativePath>
1616
</parent>
1717

1818
<dependencies>

spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/MySQLAutoconfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public DataSource dataSource() {
4747
final DriverManagerDataSource dataSource = new DriverManagerDataSource();
4848

4949
dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
50-
dataSource.setUrl("jdbc:mysql://localhost:3306/myDb?createDatabaseIfNotExist=true");
50+
dataSource.setUrl("jdbc:mysql://localhost:3306/myDb?createDatabaseIfNotExist=true&&serverTimezone=UTC");
5151
dataSource.setUsername("mysqluser");
5252
dataSource.setPassword("mysqlpass");
5353

spring-boot-bootstrap/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<name>spring-boot-bootstrap</name>
99
<description>Demo project for Spring Boot</description>
1010
<parent>
11-
<artifactId>parent-boot-2.0-temp</artifactId>
11+
<artifactId>parent-boot-2</artifactId>
1212
<groupId>com.baeldung</groupId>
1313
<version>0.0.1-SNAPSHOT</version>
14-
<relativePath>../parent-boot-2.0-temp</relativePath>
14+
<relativePath>../parent-boot-2</relativePath>
1515
</parent>
1616
<dependencies>
1717
<dependency>

spring-boot-bootstrap/src/test/java/org/baeldung/SpringBootBootstrapIntegrationTest.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,20 @@
44
import static org.apache.commons.lang3.RandomStringUtils.randomNumeric;
55
import static org.junit.Assert.assertEquals;
66
import static org.junit.Assert.assertTrue;
7-
import io.restassured.RestAssured;
8-
import io.restassured.response.Response;
97

108
import java.util.List;
119

1210
import org.baeldung.persistence.model.Book;
1311
import org.junit.Test;
14-
import org.junit.runner.RunWith;
15-
import org.springframework.boot.test.context.SpringBootTest;
16-
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
1712
import org.springframework.http.HttpStatus;
1813
import org.springframework.http.MediaType;
19-
import org.springframework.test.context.junit4.SpringRunner;
2014

21-
@RunWith(SpringRunner.class)
22-
@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.DEFINED_PORT)
15+
import io.restassured.RestAssured;
16+
import io.restassured.response.Response;
17+
2318
public class SpringBootBootstrapIntegrationTest {
2419

25-
private static final String API_ROOT = "http://localhost:8081/api/books";
20+
private static final String API_ROOT = "http://localhost:8080/api/books";
2621

2722
@Test
2823
public void whenGetAllBooks_thenOK() {

spring-boot-client/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
<description>This is simple boot client application for Spring boot actuator test</description>
1010

1111
<parent>
12-
<artifactId>parent-boot-2.0-temp</artifactId>
12+
<artifactId>parent-boot-2</artifactId>
1313
<groupId>com.baeldung</groupId>
1414
<version>0.0.1-SNAPSHOT</version>
15-
<relativePath>../parent-boot-2.0-temp</relativePath>
15+
<relativePath>../parent-boot-2</relativePath>
1616
</parent>
1717

1818
<dependencies>

spring-boot-client/src/test/java/org/baeldung/boot/client/DetailsServiceClientIntegrationTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@
1010
import org.junit.runner.RunWith;
1111
import org.springframework.beans.factory.annotation.Autowired;
1212
import org.springframework.boot.test.autoconfigure.web.client.RestClientTest;
13-
import org.springframework.boot.test.context.SpringBootTest;
1413
import org.springframework.http.MediaType;
1514
import org.springframework.test.context.junit4.SpringRunner;
1615
import org.springframework.test.web.client.MockRestServiceServer;
1716

1817
import com.fasterxml.jackson.databind.ObjectMapper;
1918

2019
@RunWith(SpringRunner.class)
21-
@SpringBootTest(classes = Application.class)
22-
@RestClientTest(DetailsServiceClient.class)
20+
@RestClientTest({ DetailsServiceClient.class, Application.class })
2321
public class DetailsServiceClientIntegrationTest {
2422

2523
@Autowired
@@ -34,7 +32,8 @@ public class DetailsServiceClientIntegrationTest {
3432
@Before
3533
public void setUp() throws Exception {
3634
String detailsString = objectMapper.writeValueAsString(new Details("John Smith", "john"));
37-
this.server.expect(requestTo("/john/details")).andRespond(withSuccess(detailsString, MediaType.APPLICATION_JSON));
35+
this.server.expect(requestTo("/john/details"))
36+
.andRespond(withSuccess(detailsString, MediaType.APPLICATION_JSON));
3837
}
3938

4039
@Test

spring-boot-ctx-fluent/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<packaging>jar</packaging>
99

1010
<parent>
11-
<artifactId>parent-boot-2.0-temp</artifactId>
11+
<artifactId>parent-boot-2</artifactId>
1212
<groupId>com.baeldung</groupId>
1313
<version>0.0.1-SNAPSHOT</version>
14-
<relativePath>../parent-boot-2.0-temp</relativePath>
14+
<relativePath>../parent-boot-2</relativePath>
1515
</parent>
1616

1717
<dependencies>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
baeldung.log

spring-boot-disable-console-logging/disabling-console-jul/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<parent>
99
<groupId>org.springframework.boot</groupId>
1010
<artifactId>spring-boot-starter-parent</artifactId>
11-
<version>2.0.5.RELEASE</version>
11+
<version>2.1.1.RELEASE</version>
1212
</parent>
1313

1414
<dependencies>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
all.log

spring-boot-disable-console-logging/disabling-console-log4j2/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<parent>
99
<groupId>org.springframework.boot</groupId>
1010
<artifactId>spring-boot-starter-parent</artifactId>
11-
<version>2.0.5.RELEASE</version>
11+
<version>2.1.1.RELEASE</version>
1212
</parent>
1313

1414
<dependencies>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
disabled-console.log
Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
<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">
2-
<modelVersion>4.0.0</modelVersion>
3-
<artifactId>disabling-console-logback</artifactId>
4-
<name>disabling-console-logback</name>
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<artifactId>disabling-console-logback</artifactId>
6+
<name>disabling-console-logback</name>
7+
8+
<parent>
9+
<artifactId>spring-boot-disable-console-logging</artifactId>
10+
<groupId>com.baeldung</groupId>
11+
<version>0.0.1-SNAPSHOT</version>
12+
<relativePath>../</relativePath>
13+
</parent>
14+
15+
<dependencies>
16+
<dependency>
17+
<groupId>org.springframework.boot</groupId>
18+
<artifactId>spring-boot-starter-web</artifactId>
19+
</dependency>
20+
</dependencies>
521

6-
<parent>
7-
<groupId>com.baeldung</groupId>
8-
<artifactId>spring-boot-disable-console-logging</artifactId>
9-
<version>0.0.1-SNAPSHOT</version>
10-
</parent>
11-
12-
<dependencies>
13-
<dependency>
14-
<groupId>org.springframework.boot</groupId>
15-
<artifactId>spring-boot-starter-web</artifactId>
16-
</dependency>
17-
</dependencies>
18-
1922
</project>

spring-boot-disable-console-logging/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<description>Projects for Disabling Spring Boot Console Logging tutorials</description>
88

99
<parent>
10-
<artifactId>parent-boot-2.0-temp</artifactId>
10+
<artifactId>parent-boot-2</artifactId>
1111
<groupId>com.baeldung</groupId>
1212
<version>0.0.1-SNAPSHOT</version>
13-
<relativePath>../parent-boot-2.0-temp</relativePath>
13+
<relativePath>../parent-boot-2</relativePath>
1414
</parent>
1515

1616
<modules>

spring-boot-jasypt/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<description>Demo project for Spring Boot</description>
1111

1212
<parent>
13-
<artifactId>parent-boot-2.0-temp</artifactId>
13+
<artifactId>parent-boot-2</artifactId>
1414
<groupId>com.baeldung</groupId>
1515
<version>0.0.1-SNAPSHOT</version>
16-
<relativePath>../parent-boot-2.0-temp</relativePath>
16+
<relativePath>../parent-boot-2</relativePath>
1717
</parent>
1818

1919
<dependencies>

spring-boot-mvc/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<description>Module For Spring Boot MVC</description>
99

1010
<parent>
11-
<artifactId>parent-boot-2.0-temp</artifactId>
11+
<artifactId>parent-boot-2</artifactId>
1212
<groupId>com.baeldung</groupId>
1313
<version>0.0.1-SNAPSHOT</version>
14-
<relativePath>../parent-boot-2.0-temp</relativePath>
14+
<relativePath>../parent-boot-2</relativePath>
1515
</parent>
1616

1717
<dependencies>

spring-boot-ops/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
<description>Demo project for Spring Boot</description>
1010

1111
<parent>
12-
<artifactId>parent-boot-2.0-temp</artifactId>
12+
<artifactId>parent-boot-2</artifactId>
1313
<groupId>com.baeldung</groupId>
1414
<version>0.0.1-SNAPSHOT</version>
15-
<relativePath>../parent-boot-2.0-temp</relativePath>
15+
<relativePath>../parent-boot-2</relativePath>
1616
</parent>
1717

1818
<dependencies>

spring-boot-vue/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<description>Demo project for Spring Boot Vue project</description>
1313

1414
<parent>
15-
<artifactId>parent-boot-2.0-temp</artifactId>
15+
<artifactId>parent-boot-2</artifactId>
1616
<groupId>com.baeldung</groupId>
1717
<version>0.0.1-SNAPSHOT</version>
18-
<relativePath>../parent-boot-2.0-temp</relativePath>
18+
<relativePath>../parent-boot-2</relativePath>
1919
</parent>
2020

2121
<properties>

spring-boot/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<description>This is simple boot application for Spring boot actuator test</description>
99

1010
<parent>
11-
<artifactId>parent-boot-2.0-temp</artifactId>
11+
<artifactId>parent-boot-2</artifactId>
1212
<groupId>com.baeldung</groupId>
1313
<version>0.0.1-SNAPSHOT</version>
14-
<relativePath>../parent-boot-2.0-temp</relativePath>
14+
<relativePath>../parent-boot-2</relativePath>
1515
</parent>
1616

1717
<dependencies>

spring-boot/src/test/java/com/baeldung/intro/AppLiveTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
package com.baeldung.intro;
22

3+
import static org.hamcrest.Matchers.equalTo;
4+
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
5+
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
6+
37
import org.junit.Test;
48
import org.junit.runner.RunWith;
59
import org.springframework.beans.factory.annotation.Autowired;
610
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
711
import org.springframework.boot.test.context.SpringBootTest;
812
import org.springframework.http.MediaType;
9-
import org.springframework.test.context.TestPropertySource;
1013
import org.springframework.test.context.junit4.SpringRunner;
1114
import org.springframework.test.web.servlet.MockMvc;
1215
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
1316

14-
import static org.hamcrest.Matchers.equalTo;
15-
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
16-
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
17-
1817
@RunWith(SpringRunner.class)
1918
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.MOCK)
2019
@AutoConfigureMockMvc

spring-boot/src/test/java/org/baeldung/boot/DemoApplicationIntegrationTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
import org.junit.Test;
55
import org.junit.runner.RunWith;
66
import org.springframework.boot.test.context.SpringBootTest;
7+
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
78
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
8-
import org.springframework.test.context.web.WebAppConfiguration;
99

1010
@RunWith(SpringJUnit4ClassRunner.class)
11-
@SpringBootTest(classes = DemoApplication.class)
12-
@WebAppConfiguration
11+
@SpringBootTest(classes = DemoApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
1312
public class DemoApplicationIntegrationTest {
1413

1514
@Test

spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeRestControllerIntegrationTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@
2222
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
2323
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
2424
import org.springframework.boot.test.context.SpringBootTest;
25+
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
2526
import org.springframework.http.MediaType;
2627
import org.springframework.test.context.junit4.SpringRunner;
2728
import org.springframework.test.web.servlet.MockMvc;
2829

2930
@RunWith(SpringRunner.class)
30-
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.MOCK, classes = DemoApplication.class)
31-
@AutoConfigureMockMvc
31+
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, classes = DemoApplication.class)
32+
@AutoConfigureMockMvc
3233
// @TestPropertySource(locations = "classpath:application-integrationtest.properties")
3334
@AutoConfigureTestDatabase
3435
public class EmployeeRestControllerIntegrationTest {

spring-cloud-data-flow/etl/customer-mongodb-sink/pom.xml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
<description>Example ETL Load Project</description>
1212

1313
<parent>
14-
<artifactId>parent-boot-2.0-temp</artifactId>
14+
<artifactId>parent-boot-2</artifactId>
1515
<groupId>com.baeldung</groupId>
1616
<version>0.0.1-SNAPSHOT</version>
17-
<relativePath>../../../parent-boot-2.0-temp</relativePath>
17+
<relativePath>../../../parent-boot-2</relativePath>
1818
</parent>
19-
19+
2020
<properties>
2121
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2222
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2323
<java.version>1.8</java.version>
24-
<spring-cloud.version>Finchley.SR1</spring-cloud.version>
24+
<spring-cloud.version>Greenwich.M3</spring-cloud.version>
2525
</properties>
2626

2727
<dependencies>
@@ -70,5 +70,16 @@
7070
</plugins>
7171
</build>
7272

73+
<repositories>
74+
<repository>
75+
<id>spring-milestones</id>
76+
<name>Spring Milestones</name>
77+
<url>http://repo.spring.io/milestone</url>
78+
<snapshots>
79+
<enabled>false</enabled>
80+
</snapshots>
81+
</repository>
82+
</repositories>
83+
7384

7485
</project>

spring-cloud-data-flow/etl/customer-transform/pom.xml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
<description>Example transform ETL step</description>
1313

1414
<parent>
15-
<artifactId>parent-boot-2.0-temp</artifactId>
15+
<artifactId>parent-boot-2</artifactId>
1616
<groupId>com.baeldung</groupId>
1717
<version>0.0.1-SNAPSHOT</version>
18-
<relativePath>../../../parent-boot-2.0-temp</relativePath>
18+
<relativePath>../../../parent-boot-2</relativePath>
1919
</parent>
2020

2121
<properties>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2424
<java.version>1.8</java.version>
25-
<spring-cloud.version>Finchley.SR1</spring-cloud.version>
25+
<spring-cloud.version>Greenwich.M3</spring-cloud.version>
2626
</properties>
2727

2828
<dependencies>
@@ -63,5 +63,15 @@
6363
</plugins>
6464
</build>
6565

66+
<repositories>
67+
<repository>
68+
<id>spring-milestones</id>
69+
<name>Spring Milestones</name>
70+
<url>http://repo.spring.io/milestone</url>
71+
<snapshots>
72+
<enabled>false</enabled>
73+
</snapshots>
74+
</repository>
75+
</repositories>
6676

6777
</project>

0 commit comments

Comments
 (0)