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

26 files changed

Lines changed: 106 additions & 75 deletions

File tree

‎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

0 commit comments

Comments
 (0)