Skip to content

Commit 2c97fbd

Browse files
Applied Eclipse code formatter
1 parent 0f0cc56 commit 2c97fbd

7 files changed

Lines changed: 162 additions & 182 deletions

File tree

‎spring-cloud-config/client/pom.xml‎

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,80 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" 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>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
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>
55

6-
<parent>
7-
<groupId>com.baeldung.spring.cloud</groupId>
8-
<artifactId>spring-cloud-config</artifactId>
9-
<version>0.0.1-SNAPSHOT</version>
10-
</parent>
11-
<artifactId>client</artifactId>
12-
<packaging>jar</packaging>
6+
<parent>
7+
<groupId>com.baeldung.spring.cloud</groupId>
8+
<artifactId>spring-cloud-config</artifactId>
9+
<version>0.0.1-SNAPSHOT</version>
10+
</parent>
11+
<artifactId>client</artifactId>
12+
<packaging>jar</packaging>
1313

14-
<name>client</name>
15-
<description>Demo project for Spring Cloud Config Client</description>
14+
<name>client</name>
15+
<description>Demo project for Spring Cloud Config Client</description>
1616

17-
<properties>
18-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
20-
<java.version>1.8</java.version>
21-
</properties>
17+
<properties>
18+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
20+
<java.version>1.8</java.version>
21+
</properties>
2222

23-
<dependencies>
24-
<dependency>
25-
<groupId>org.springframework.cloud</groupId>
26-
<artifactId>spring-cloud-starter-config</artifactId>
27-
</dependency>
28-
<dependency>
29-
<groupId>org.springframework.boot</groupId>
30-
<artifactId>spring-boot-starter-web</artifactId>
31-
</dependency>
23+
<dependencies>
24+
<dependency>
25+
<groupId>org.springframework.cloud</groupId>
26+
<artifactId>spring-cloud-starter-config</artifactId>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.springframework.boot</groupId>
30+
<artifactId>spring-boot-starter-web</artifactId>
31+
</dependency>
3232

33-
<dependency>
34-
<groupId>org.springframework.boot</groupId>
35-
<artifactId>spring-boot-starter-test</artifactId>
36-
<scope>test</scope>
37-
</dependency>
38-
</dependencies>
33+
<dependency>
34+
<groupId>org.springframework.boot</groupId>
35+
<artifactId>spring-boot-starter-test</artifactId>
36+
<scope>test</scope>
37+
</dependency>
38+
</dependencies>
3939

40-
<dependencyManagement>
41-
<dependencies>
42-
<dependency>
43-
<groupId>org.springframework.cloud</groupId>
44-
<artifactId>spring-cloud-dependencies</artifactId>
45-
<version>Brixton.BUILD-SNAPSHOT</version>
46-
<type>pom</type>
47-
<scope>import</scope>
48-
</dependency>
49-
</dependencies>
50-
</dependencyManagement>
40+
<dependencyManagement>
41+
<dependencies>
42+
<dependency>
43+
<groupId>org.springframework.cloud</groupId>
44+
<artifactId>spring-cloud-dependencies</artifactId>
45+
<version>Brixton.BUILD-SNAPSHOT</version>
46+
<type>pom</type>
47+
<scope>import</scope>
48+
</dependency>
49+
</dependencies>
50+
</dependencyManagement>
5151

52-
<build>
53-
<plugins>
54-
<plugin>
55-
<groupId>org.springframework.boot</groupId>
56-
<artifactId>spring-boot-maven-plugin</artifactId>
57-
</plugin>
58-
</plugins>
59-
</build>
52+
<build>
53+
<plugins>
54+
<plugin>
55+
<groupId>org.springframework.boot</groupId>
56+
<artifactId>spring-boot-maven-plugin</artifactId>
57+
</plugin>
58+
</plugins>
59+
</build>
6060

61-
<repositories>
62-
<repository>
63-
<id>spring-snapshots</id>
64-
<name>Spring Snapshots</name>
65-
<url>https://repo.spring.io/snapshot</url>
66-
<snapshots>
67-
<enabled>true</enabled>
68-
</snapshots>
69-
</repository>
70-
<repository>
71-
<id>spring-milestones</id>
72-
<name>Spring Milestones</name>
73-
<url>https://repo.spring.io/milestone</url>
74-
<snapshots>
75-
<enabled>false</enabled>
76-
</snapshots>
77-
</repository>
78-
</repositories>
61+
<repositories>
62+
<repository>
63+
<id>spring-snapshots</id>
64+
<name>Spring Snapshots</name>
65+
<url>https://repo.spring.io/snapshot</url>
66+
<snapshots>
67+
<enabled>true</enabled>
68+
</snapshots>
69+
</repository>
70+
<repository>
71+
<id>spring-milestones</id>
72+
<name>Spring Milestones</name>
73+
<url>https://repo.spring.io/milestone</url>
74+
<snapshots>
75+
<enabled>false</enabled>
76+
</snapshots>
77+
</repository>
78+
</repositories>
7979

8080
</project>

‎spring-cloud-config/client/src/main/java/com/baeldung/spring/cloud/config/client/ConfigClient.java‎

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,17 @@
99
import org.springframework.web.bind.annotation.RequestMethod;
1010
import org.springframework.web.bind.annotation.RestController;
1111

12-
@SpringBootApplication
13-
@RestController
14-
public class ConfigClient {
12+
@SpringBootApplication @RestController public class ConfigClient {
1513

16-
@Value("${user.role}")
17-
private String role;
14+
@Value("${user.role}") private String role;
1815

19-
@Value("${user.password}")
20-
private String password;
16+
@Value("${user.password}") private String password;
2117

22-
public static void main(String[] args) {
23-
SpringApplication.run(ConfigClient.class, args);
24-
}
18+
public static void main(String[] args) {
19+
SpringApplication.run(ConfigClient.class, args);
20+
}
2521

26-
@RequestMapping(
27-
value = "/whoami/{username}",
28-
method = RequestMethod.GET,
29-
produces = MediaType.TEXT_PLAIN_VALUE
30-
)
31-
public String whoami(@PathVariable("username") String username) {
32-
return String.format("Hello %s! You are a(n) %s and your password is '%s'.\n", username, role, password);
33-
}
22+
@RequestMapping(value = "/whoami/{username}", method = RequestMethod.GET, produces = MediaType.TEXT_PLAIN_VALUE) public String whoami(@PathVariable("username") String username) {
23+
return String.format("Hello %s! You are a(n) %s and your password is '%s'.\n", username, role, password);
24+
}
3425
}

‎spring-cloud-config/client/src/test/java/com/baeldung/spring/cloud/config/client/ConfigClientTests.java‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@
66
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
77
import org.springframework.test.context.web.WebAppConfiguration;
88

9-
@RunWith(SpringJUnit4ClassRunner.class)
10-
@SpringApplicationConfiguration(classes = ConfigClient.class)
11-
@WebAppConfiguration
12-
public class ConfigClientTests {
9+
@RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = ConfigClient.class) @WebAppConfiguration public class ConfigClientTests {
1310

14-
@Test
15-
public void contextLoads() {
16-
}
11+
@Test public void contextLoads() {
12+
}
1713

1814
}

‎spring-cloud-config/pom.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

‎spring-cloud-config/server/pom.xml‎

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,83 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" 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>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
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>
55

6-
<parent>
7-
<groupId>com.baeldung.spring.cloud</groupId>
8-
<artifactId>spring-cloud-config</artifactId>
9-
<version>0.0.1-SNAPSHOT</version>
10-
</parent>
11-
<artifactId>server</artifactId>
6+
<parent>
7+
<groupId>com.baeldung.spring.cloud</groupId>
8+
<artifactId>spring-cloud-config</artifactId>
9+
<version>0.0.1-SNAPSHOT</version>
10+
</parent>
11+
<artifactId>server</artifactId>
1212

13-
<name>server</name>
14-
<description>Demo project for Spring Cloud Config Server</description>
13+
<name>server</name>
14+
<description>Demo project for Spring Cloud Config Server</description>
1515

16-
<properties>
17-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
19-
<java.version>1.8</java.version>
20-
</properties>
16+
<properties>
17+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
19+
<java.version>1.8</java.version>
20+
</properties>
2121

22-
<dependencies>
23-
<dependency>
24-
<groupId>org.springframework.cloud</groupId>
25-
<artifactId>spring-cloud-config-server</artifactId>
26-
</dependency>
27-
<dependency>
28-
<groupId>org.springframework.boot</groupId>
29-
<artifactId>spring-boot-starter-security</artifactId>
30-
</dependency>
31-
<dependency>
32-
<groupId>org.springframework.boot</groupId>
33-
<artifactId>spring-boot-starter-web</artifactId>
34-
</dependency>
22+
<dependencies>
23+
<dependency>
24+
<groupId>org.springframework.cloud</groupId>
25+
<artifactId>spring-cloud-config-server</artifactId>
26+
</dependency>
27+
<dependency>
28+
<groupId>org.springframework.boot</groupId>
29+
<artifactId>spring-boot-starter-security</artifactId>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.springframework.boot</groupId>
33+
<artifactId>spring-boot-starter-web</artifactId>
34+
</dependency>
3535

36-
<dependency>
37-
<groupId>org.springframework.boot</groupId>
38-
<artifactId>spring-boot-starter-test</artifactId>
39-
<scope>test</scope>
40-
</dependency>
41-
</dependencies>
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-starter-test</artifactId>
39+
<scope>test</scope>
40+
</dependency>
41+
</dependencies>
4242

43-
<dependencyManagement>
44-
<dependencies>
45-
<dependency>
46-
<groupId>org.springframework.cloud</groupId>
47-
<artifactId>spring-cloud-dependencies</artifactId>
48-
<version>Brixton.BUILD-SNAPSHOT</version>
49-
<type>pom</type>
50-
<scope>import</scope>
51-
</dependency>
52-
</dependencies>
53-
</dependencyManagement>
43+
<dependencyManagement>
44+
<dependencies>
45+
<dependency>
46+
<groupId>org.springframework.cloud</groupId>
47+
<artifactId>spring-cloud-dependencies</artifactId>
48+
<version>Brixton.BUILD-SNAPSHOT</version>
49+
<type>pom</type>
50+
<scope>import</scope>
51+
</dependency>
52+
</dependencies>
53+
</dependencyManagement>
5454

55-
<build>
56-
<plugins>
57-
<plugin>
58-
<groupId>org.springframework.boot</groupId>
59-
<artifactId>spring-boot-maven-plugin</artifactId>
60-
</plugin>
61-
</plugins>
62-
</build>
55+
<build>
56+
<plugins>
57+
<plugin>
58+
<groupId>org.springframework.boot</groupId>
59+
<artifactId>spring-boot-maven-plugin</artifactId>
60+
</plugin>
61+
</plugins>
62+
</build>
6363

64-
<repositories>
65-
<repository>
66-
<id>spring-snapshots</id>
67-
<name>Spring Snapshots</name>
68-
<url>https://repo.spring.io/snapshot</url>
69-
<snapshots>
70-
<enabled>true</enabled>
71-
</snapshots>
72-
</repository>
73-
<repository>
74-
<id>spring-milestones</id>
75-
<name>Spring Milestones</name>
76-
<url>https://repo.spring.io/milestone</url>
77-
<snapshots>
78-
<enabled>false</enabled>
79-
</snapshots>
80-
</repository>
81-
</repositories>
64+
<repositories>
65+
<repository>
66+
<id>spring-snapshots</id>
67+
<name>Spring Snapshots</name>
68+
<url>https://repo.spring.io/snapshot</url>
69+
<snapshots>
70+
<enabled>true</enabled>
71+
</snapshots>
72+
</repository>
73+
<repository>
74+
<id>spring-milestones</id>
75+
<name>Spring Milestones</name>
76+
<url>https://repo.spring.io/milestone</url>
77+
<snapshots>
78+
<enabled>false</enabled>
79+
</snapshots>
80+
</repository>
81+
</repositories>
8282

8383
</project>

‎spring-cloud-config/server/src/main/java/com/baeldung/spring/cloud/config/server/ConfigServer.java‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@
55
import org.springframework.cloud.config.server.EnableConfigServer;
66
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
77

8-
@SpringBootApplication
9-
@EnableConfigServer
10-
@EnableWebSecurity
11-
public class ConfigServer {
8+
@SpringBootApplication @EnableConfigServer @EnableWebSecurity public class ConfigServer {
129

13-
public static void main(String[] args) {
14-
SpringApplication.run(ConfigServer.class, args);
15-
}
10+
public static void main(String[] args) {
11+
SpringApplication.run(ConfigServer.class, args);
12+
}
1613
}

0 commit comments

Comments
 (0)