Skip to content

Commit bad0460

Browse files
committed
* migrated the following modules:
spring-boot spring-boot-autoconfiguration spring-boot-bootstrap spring-boot-client spring-boot-ctx-fluent spring-boot-disable-console-logging spring-boot-jasypt spring-boot-mvc spring-boot-ops spring-boot-vue spring-cloud/spring-cloud-vault spring-data-rest
1 parent a2ceb57 commit bad0460

13 files changed

Lines changed: 54 additions & 44 deletions

File tree

‎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/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/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
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/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

0 commit comments

Comments
 (0)