Skip to content

Commit 82559f7

Browse files
committed
Merge branch 'craedel-spring-cloud-config'
2 parents b4e0135 + 8ed35a5 commit 82559f7

17 files changed

Lines changed: 153 additions & 225 deletions

File tree

‎spring-cloud-config/README.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Spring Cloud Config ##
2+
3+
To get this example working, you have to initialize a new *Git* repository in
4+
the ```client-config``` directory first *and* you have to set the environment variable
5+
```CONFIG_REPO``` to an absolute path of that directory.
6+
7+
```
8+
$> cd client-config
9+
$> git init
10+
$> git add .
11+
$> git commit -m 'Initial commit'
12+
$> export CONFIG_REPO=$(pwd)
13+
```
14+
15+
Then you're able to run the examples with ```mvn install spring-boot:run```.
16+
17+
### Docker ###
18+
19+
To get the *Docker* examples working, you have to repackage the ```spring-cloud-config-server```
20+
and ```spring-cloud-config-client``` modules first:
21+
22+
```
23+
$> mvn install spring-boot:repackage
24+
```
25+
26+
Don't forget to download the *Java JCE* package from
27+
(Oracle)[http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html].

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

Lines changed: 0 additions & 79 deletions
This file was deleted.

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

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM alpine-java:base
22
MAINTAINER baeldung.com
33
RUN apk --no-cache add netcat-openbsd
4-
COPY files/config-client.jar /opt/spring-cloud/lib/
4+
COPY files/spring-cloud-config-client-1.0.0-SNAPSHOT.jar /opt/spring-cloud/lib/config-client.jar
55
COPY files/config-client-entrypoint.sh /opt/spring-cloud/bin/
66
RUN chmod 755 /opt/spring-cloud/bin/config-client-entrypoint.sh

‎spring-cloud-config/docker/Dockerfile.server‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM alpine-java:base
22
MAINTAINER baeldung.com
3-
COPY files/config-server.jar /opt/spring-cloud/lib/
3+
COPY files/spring-cloud-config-server-1.0.0-SNAPSHOT.jar /opt/spring-cloud/lib/config-server.jar
44
ENV SPRING_APPLICATION_JSON='{"spring": {"cloud": {"config": {"server": \
55
{"git": {"uri": "/var/lib/spring-cloud/config-repo", "clone-on-start": true}}}}}}'
66
ENTRYPOINT ["/usr/bin/java"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/UnlimitedJCEPolicyJDK8
2+
/*.jar

spring-cloud-config/docker/config-client-entrypoint.sh renamed to spring-cloud-config/docker/files/config-client-entrypoint.sh

File renamed without changes.

‎spring-cloud-config/pom.xml‎

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,48 @@
55

66
<groupId>com.baeldung.spring.cloud</groupId>
77
<artifactId>spring-cloud-config</artifactId>
8-
<version>0.0.1-SNAPSHOT</version>
98
<packaging>pom</packaging>
109

1110
<modules>
12-
<module>server</module>
13-
<module>client</module>
11+
<module>spring-cloud-config-server</module>
12+
<module>spring-cloud-config-client</module>
1413
</modules>
1514

1615
<parent>
17-
<groupId>org.springframework.boot</groupId>
18-
<artifactId>spring-boot-starter-parent</artifactId>
19-
<version>1.3.5.RELEASE</version>
16+
<groupId>com.baeldung</groupId>
17+
<artifactId>parent-modules</artifactId>
18+
<version>1.0.0-SNAPSHOT</version>
19+
<relativePath>..</relativePath>
2020
</parent>
2121

22-
<build>
23-
<plugins>
24-
<plugin>
25-
<groupId>org.apache.maven.plugins</groupId>
26-
<artifactId>maven-surefire-plugin</artifactId>
27-
<version>${maven-surefire-plugin.version}</version>
28-
<configuration>
29-
<excludes>
30-
<exclude>**/*LiveTest.java</exclude>
31-
</excludes>
32-
</configuration>
33-
</plugin>
22+
<dependencyManagement>
23+
<dependencies>
24+
<dependency>
25+
<groupId>org.springframework.boot</groupId>
26+
<artifactId>spring-boot-parent</artifactId>
27+
<version>1.4.0.RELEASE</version>
28+
<type>pom</type>
29+
<scope>import</scope>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.springframework.cloud</groupId>
33+
<artifactId>spring-cloud-dependencies</artifactId>
34+
<version>Brixton.SR4</version>
35+
<type>pom</type>
36+
<scope>import</scope>
37+
</dependency>
38+
</dependencies>
39+
</dependencyManagement>
3440

35-
</plugins>
41+
<build>
42+
<pluginManagement>
43+
<plugins>
44+
<plugin>
45+
<groupId>org.springframework.boot</groupId>
46+
<artifactId>spring-boot-maven-plugin</artifactId>
47+
<version>1.4.0.RELEASE</version>
48+
</plugin>
49+
</plugins>
50+
</pluginManagement>
3651
</build>
37-
38-
<properties>
39-
<org.springframework.boot.version>1.3.5.RELEASE</org.springframework.boot.version>
40-
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
41-
</properties>
4252
</project>

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

Lines changed: 0 additions & 82 deletions
This file was deleted.

‎spring-cloud-config/server/src/test/java/com/baeldung/spring/cloud/config/server/ConfigServerListTest.java‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)