File tree 26 files changed +106
-75
lines changed
spring-boot-autoconfiguration
src/main/java/com/baeldung/autoconfiguration
src/test/java/org/baeldung
src/test/java/org/baeldung/boot/client
spring-boot-disable-console-logging
disabling-console-logback
spring-cloud/spring-cloud-vault
spring-cloud-data-flow/etl
26 files changed +106
-75
lines changed Original file line number Diff line number Diff line change 9
9
<description >This is simple boot application demonstrating a custom auto-configuration</description >
10
10
11
11
<parent >
12
- <artifactId >parent-boot-2.0-temp </artifactId >
12
+ <artifactId >parent-boot-2</artifactId >
13
13
<groupId >com.baeldung</groupId >
14
14
<version >0.0.1-SNAPSHOT</version >
15
- <relativePath >../parent-boot-2.0-temp </relativePath >
15
+ <relativePath >../parent-boot-2</relativePath >
16
16
</parent >
17
17
18
18
<dependencies >
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public DataSource dataSource() {
47
47
final DriverManagerDataSource dataSource = new DriverManagerDataSource ();
48
48
49
49
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 " );
51
51
dataSource .setUsername ("mysqluser" );
52
52
dataSource .setPassword ("mysqlpass" );
53
53
Original file line number Diff line number Diff line change 8
8
<name >spring-boot-bootstrap</name >
9
9
<description >Demo project for Spring Boot</description >
10
10
<parent >
11
- <artifactId >parent-boot-2.0-temp </artifactId >
11
+ <artifactId >parent-boot-2</artifactId >
12
12
<groupId >com.baeldung</groupId >
13
13
<version >0.0.1-SNAPSHOT</version >
14
- <relativePath >../parent-boot-2.0-temp </relativePath >
14
+ <relativePath >../parent-boot-2</relativePath >
15
15
</parent >
16
16
<dependencies >
17
17
<dependency >
Original file line number Diff line number Diff line change 4
4
import static org .apache .commons .lang3 .RandomStringUtils .randomNumeric ;
5
5
import static org .junit .Assert .assertEquals ;
6
6
import static org .junit .Assert .assertTrue ;
7
- import io .restassured .RestAssured ;
8
- import io .restassured .response .Response ;
9
7
10
8
import java .util .List ;
11
9
12
10
import org .baeldung .persistence .model .Book ;
13
11
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 ;
17
12
import org .springframework .http .HttpStatus ;
18
13
import org .springframework .http .MediaType ;
19
- import org .springframework .test .context .junit4 .SpringRunner ;
20
14
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
+
23
18
public class SpringBootBootstrapIntegrationTest {
24
19
25
- private static final String API_ROOT = "http://localhost:8081 /api/books" ;
20
+ private static final String API_ROOT = "http://localhost:8080 /api/books" ;
26
21
27
22
@ Test
28
23
public void whenGetAllBooks_thenOK () {
Original file line number Diff line number Diff line change 9
9
<description >This is simple boot client application for Spring boot actuator test</description >
10
10
11
11
<parent >
12
- <artifactId >parent-boot-2.0-temp </artifactId >
12
+ <artifactId >parent-boot-2</artifactId >
13
13
<groupId >com.baeldung</groupId >
14
14
<version >0.0.1-SNAPSHOT</version >
15
- <relativePath >../parent-boot-2.0-temp </relativePath >
15
+ <relativePath >../parent-boot-2</relativePath >
16
16
</parent >
17
17
18
18
<dependencies >
Original file line number Diff line number Diff line change 10
10
import org .junit .runner .RunWith ;
11
11
import org .springframework .beans .factory .annotation .Autowired ;
12
12
import org .springframework .boot .test .autoconfigure .web .client .RestClientTest ;
13
- import org .springframework .boot .test .context .SpringBootTest ;
14
13
import org .springframework .http .MediaType ;
15
14
import org .springframework .test .context .junit4 .SpringRunner ;
16
15
import org .springframework .test .web .client .MockRestServiceServer ;
17
16
18
17
import com .fasterxml .jackson .databind .ObjectMapper ;
19
18
20
19
@ RunWith (SpringRunner .class )
21
- @ SpringBootTest (classes = Application .class )
22
- @ RestClientTest (DetailsServiceClient .class )
20
+ @ RestClientTest ({ DetailsServiceClient .class , Application .class })
23
21
public class DetailsServiceClientIntegrationTest {
24
22
25
23
@ Autowired
@@ -34,7 +32,8 @@ public class DetailsServiceClientIntegrationTest {
34
32
@ Before
35
33
public void setUp () throws Exception {
36
34
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 ));
38
37
}
39
38
40
39
@ Test
Original file line number Diff line number Diff line change 8
8
<packaging >jar</packaging >
9
9
10
10
<parent >
11
- <artifactId >parent-boot-2.0-temp </artifactId >
11
+ <artifactId >parent-boot-2</artifactId >
12
12
<groupId >com.baeldung</groupId >
13
13
<version >0.0.1-SNAPSHOT</version >
14
- <relativePath >../parent-boot-2.0-temp </relativePath >
14
+ <relativePath >../parent-boot-2</relativePath >
15
15
</parent >
16
16
17
17
<dependencies >
Original file line number Diff line number Diff line change
1
+ baeldung.log
Original file line number Diff line number Diff line change 8
8
<parent >
9
9
<groupId >org.springframework.boot</groupId >
10
10
<artifactId >spring-boot-starter-parent</artifactId >
11
- <version >2.0.5 .RELEASE</version >
11
+ <version >2.1.1 .RELEASE</version >
12
12
</parent >
13
13
14
14
<dependencies >
Original file line number Diff line number Diff line change
1
+ all.log
Original file line number Diff line number Diff line change 8
8
<parent >
9
9
<groupId >org.springframework.boot</groupId >
10
10
<artifactId >spring-boot-starter-parent</artifactId >
11
- <version >2.0.5 .RELEASE</version >
11
+ <version >2.1.1 .RELEASE</version >
12
12
</parent >
13
13
14
14
<dependencies >
Original file line number Diff line number Diff line change
1
+ disabled-console.log
Original file line number Diff line number Diff line change 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 >
5
21
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
-
19
22
</project >
Original file line number Diff line number Diff line change 7
7
<description >Projects for Disabling Spring Boot Console Logging tutorials</description >
8
8
9
9
<parent >
10
- <artifactId >parent-boot-2.0-temp </artifactId >
10
+ <artifactId >parent-boot-2</artifactId >
11
11
<groupId >com.baeldung</groupId >
12
12
<version >0.0.1-SNAPSHOT</version >
13
- <relativePath >../parent-boot-2.0-temp </relativePath >
13
+ <relativePath >../parent-boot-2</relativePath >
14
14
</parent >
15
15
16
16
<modules >
Original file line number Diff line number Diff line change 10
10
<description >Demo project for Spring Boot</description >
11
11
12
12
<parent >
13
- <artifactId >parent-boot-2.0-temp </artifactId >
13
+ <artifactId >parent-boot-2</artifactId >
14
14
<groupId >com.baeldung</groupId >
15
15
<version >0.0.1-SNAPSHOT</version >
16
- <relativePath >../parent-boot-2.0-temp </relativePath >
16
+ <relativePath >../parent-boot-2</relativePath >
17
17
</parent >
18
18
19
19
<dependencies >
Original file line number Diff line number Diff line change 8
8
<description >Module For Spring Boot MVC</description >
9
9
10
10
<parent >
11
- <artifactId >parent-boot-2.0-temp </artifactId >
11
+ <artifactId >parent-boot-2</artifactId >
12
12
<groupId >com.baeldung</groupId >
13
13
<version >0.0.1-SNAPSHOT</version >
14
- <relativePath >../parent-boot-2.0-temp </relativePath >
14
+ <relativePath >../parent-boot-2</relativePath >
15
15
</parent >
16
16
17
17
<dependencies >
Original file line number Diff line number Diff line change 9
9
<description >Demo project for Spring Boot</description >
10
10
11
11
<parent >
12
- <artifactId >parent-boot-2.0-temp </artifactId >
12
+ <artifactId >parent-boot-2</artifactId >
13
13
<groupId >com.baeldung</groupId >
14
14
<version >0.0.1-SNAPSHOT</version >
15
- <relativePath >../parent-boot-2.0-temp </relativePath >
15
+ <relativePath >../parent-boot-2</relativePath >
16
16
</parent >
17
17
18
18
<dependencies >
Original file line number Diff line number Diff line change 12
12
<description >Demo project for Spring Boot Vue project</description >
13
13
14
14
<parent >
15
- <artifactId >parent-boot-2.0-temp </artifactId >
15
+ <artifactId >parent-boot-2</artifactId >
16
16
<groupId >com.baeldung</groupId >
17
17
<version >0.0.1-SNAPSHOT</version >
18
- <relativePath >../parent-boot-2.0-temp </relativePath >
18
+ <relativePath >../parent-boot-2</relativePath >
19
19
</parent >
20
20
21
21
<properties >
Original file line number Diff line number Diff line change 8
8
<description >This is simple boot application for Spring boot actuator test</description >
9
9
10
10
<parent >
11
- <artifactId >parent-boot-2.0-temp </artifactId >
11
+ <artifactId >parent-boot-2</artifactId >
12
12
<groupId >com.baeldung</groupId >
13
13
<version >0.0.1-SNAPSHOT</version >
14
- <relativePath >../parent-boot-2.0-temp </relativePath >
14
+ <relativePath >../parent-boot-2</relativePath >
15
15
</parent >
16
16
17
17
<dependencies >
Original file line number Diff line number Diff line change 1
1
package com .baeldung .intro ;
2
2
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
+
3
7
import org .junit .Test ;
4
8
import org .junit .runner .RunWith ;
5
9
import org .springframework .beans .factory .annotation .Autowired ;
6
10
import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
7
11
import org .springframework .boot .test .context .SpringBootTest ;
8
12
import org .springframework .http .MediaType ;
9
- import org .springframework .test .context .TestPropertySource ;
10
13
import org .springframework .test .context .junit4 .SpringRunner ;
11
14
import org .springframework .test .web .servlet .MockMvc ;
12
15
import org .springframework .test .web .servlet .request .MockMvcRequestBuilders ;
13
16
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
-
18
17
@ RunWith (SpringRunner .class )
19
18
@ SpringBootTest (webEnvironment = SpringBootTest .WebEnvironment .MOCK )
20
19
@ AutoConfigureMockMvc
Original file line number Diff line number Diff line change 4
4
import org .junit .Test ;
5
5
import org .junit .runner .RunWith ;
6
6
import org .springframework .boot .test .context .SpringBootTest ;
7
+ import org .springframework .boot .test .context .SpringBootTest .WebEnvironment ;
7
8
import org .springframework .test .context .junit4 .SpringJUnit4ClassRunner ;
8
- import org .springframework .test .context .web .WebAppConfiguration ;
9
9
10
10
@ RunWith (SpringJUnit4ClassRunner .class )
11
- @ SpringBootTest (classes = DemoApplication .class )
12
- @ WebAppConfiguration
11
+ @ SpringBootTest (classes = DemoApplication .class , webEnvironment = WebEnvironment .RANDOM_PORT )
13
12
public class DemoApplicationIntegrationTest {
14
13
15
14
@ Test
Original file line number Diff line number Diff line change 22
22
import org .springframework .boot .test .autoconfigure .jdbc .AutoConfigureTestDatabase ;
23
23
import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
24
24
import org .springframework .boot .test .context .SpringBootTest ;
25
+ import org .springframework .boot .test .context .SpringBootTest .WebEnvironment ;
25
26
import org .springframework .http .MediaType ;
26
27
import org .springframework .test .context .junit4 .SpringRunner ;
27
28
import org .springframework .test .web .servlet .MockMvc ;
28
29
29
30
@ 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
32
33
// @TestPropertySource(locations = "classpath:application-integrationtest.properties")
33
34
@ AutoConfigureTestDatabase
34
35
public class EmployeeRestControllerIntegrationTest {
Original file line number Diff line number Diff line change 11
11
<description >Example ETL Load Project</description >
12
12
13
13
<parent >
14
- <artifactId >parent-boot-2.0-temp </artifactId >
14
+ <artifactId >parent-boot-2</artifactId >
15
15
<groupId >com.baeldung</groupId >
16
16
<version >0.0.1-SNAPSHOT</version >
17
- <relativePath >../../../parent-boot-2.0-temp </relativePath >
17
+ <relativePath >../../../parent-boot-2</relativePath >
18
18
</parent >
19
-
19
+
20
20
<properties >
21
21
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
22
22
<project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
23
23
<java .version>1.8</java .version>
24
- <spring-cloud .version>Finchley.SR1 </spring-cloud .version>
24
+ <spring-cloud .version>Greenwich.M3 </spring-cloud .version>
25
25
</properties >
26
26
27
27
<dependencies >
70
70
</plugins >
71
71
</build >
72
72
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
+
73
84
74
85
</project >
Original file line number Diff line number Diff line change 12
12
<description >Example transform ETL step</description >
13
13
14
14
<parent >
15
- <artifactId >parent-boot-2.0-temp </artifactId >
15
+ <artifactId >parent-boot-2</artifactId >
16
16
<groupId >com.baeldung</groupId >
17
17
<version >0.0.1-SNAPSHOT</version >
18
- <relativePath >../../../parent-boot-2.0-temp </relativePath >
18
+ <relativePath >../../../parent-boot-2</relativePath >
19
19
</parent >
20
20
21
21
<properties >
22
22
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
23
23
<project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
24
24
<java .version>1.8</java .version>
25
- <spring-cloud .version>Finchley.SR1 </spring-cloud .version>
25
+ <spring-cloud .version>Greenwich.M3 </spring-cloud .version>
26
26
</properties >
27
27
28
28
<dependencies >
63
63
</plugins >
64
64
</build >
65
65
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 >
66
76
67
77
</project >
You can’t perform that action at this time.
0 commit comments