Skip to content

Commit d9a92fb

Browse files
authored
Updated springboot and springcloud version (#5)
Updated deprecated versions for springboot, and springcloud, and fixed naming conventions of discoveryservice. Fixed the docker-compose files, as well as the application.yml to build the right things.
1 parent abf10f4 commit d9a92fb

File tree

5 files changed

+40
-7
lines changed

5 files changed

+40
-7
lines changed

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
buildscript {
22
ext {
3-
springBootVersion = '1.5.10.RELEASE'
3+
springBootVersion = '1.5.14.RELEASE'
44
verifierVersion = '1.2.3.RELEASE'
55
axonVersion = '3.1.2'
66
}
@@ -30,7 +30,7 @@ version = '0.0.1'
3030
sourceCompatibility = 1.8
3131

3232
ext {
33-
springCloudVersion = 'Edgware.SR2'
33+
springCloudVersion = 'Edgware.SR3'
3434
}
3535

3636
repositories {
@@ -50,13 +50,13 @@ dependencies {
5050
compile("org.axonframework:axon-amqp:${axonVersion}")
5151
compile("org.axonframework:axon-test:${axonVersion}")
5252

53-
compile('org.springframework.retry:spring-retry:1.1.2.RELEASE')
53+
compile('org.springframework.retry:spring-retry:1.2.2.RELEASE')
5454

5555
compile('org.springframework.boot:spring-boot-starter-amqp')
5656
compile('org.springframework.boot:spring-boot-starter-data-mongodb')
5757
compile('org.springframework.boot:spring-boot-starter-web')
5858
compile('org.springframework.boot:spring-boot-starter-aop')
59-
59+
compile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-client')
6060
testCompile('au.com.dius:pact-jvm-provider-junit_2.11:3.5.13')
6161
testCompile('org.springframework.boot:spring-boot-starter-test')
6262
testCompile('org.codehaus.groovy:groovy-all:2.4.6')

docker-compose-dev.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
- "5672:5672"
1616
- "15672:15672"
1717
driver-cmd:
18-
image: ../driver-cmd/
18+
build: ../driver-cmd/
1919
container_name: 'driver-cmd'
2020
environment:
2121
- RABBIT_HOST=rabbitmq
@@ -25,6 +25,25 @@ services:
2525
depends_on:
2626
- rabbitmq
2727
- mongo
28+
- discoveryservice
29+
30+
driver-query:
31+
build: ./
32+
container_name: 'driver-query'
33+
environment:
34+
- RABBIT_HOST=rabbitmq
35+
- MONGO_HOST=mongo
36+
ports:
37+
- '8080'
38+
depends_on:
39+
- rabbitmq
40+
- mongo
41+
- discoveryservice
42+
43+
discoveryservice:
44+
image: aista/eureka
45+
ports:
46+
- "8761:8761"
2847

2948
volumes:
3049
mongo:

docker-compose.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
- "5672:5672"
1414
- "15672:15672"
1515
driver-cmd:
16-
build: aista/driver-cmd/
16+
image: aista/driver-cmd/
1717
container_name: 'driver-cmd'
1818
environment:
1919
- RABBIT_HOST=rabbitmq
@@ -23,6 +23,8 @@ services:
2323
depends_on:
2424
- rabbitmq
2525
- mongo
26+
- discoveryservice
27+
2628
driver-query:
2729
build: ./
2830
container_name: 'driver-query'
@@ -34,7 +36,12 @@ services:
3436
depends_on:
3537
- rabbitmq
3638
- mongo
37-
- driver-cmd
39+
- discoveryservice
40+
41+
discoveryservice:
42+
image: aista/eureka
43+
ports:
44+
- "8761:8761"
3845

3946
volumes:
4047
mongo:

src/main/java/org/aitesting/microservices/driver/query/DriverQueryApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
import org.springframework.boot.SpringApplication;
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
56
import org.springframework.retry.annotation.EnableRetry;
67
import org.springframework.retry.annotation.Retryable;
78

89
@EnableRetry
10+
@EnableDiscoveryClient
911
@SpringBootApplication
1012
public class DriverQueryApplication {
1113
@Retryable(value = IllegalArgumentException.class, maxAttempts = 5)

src/main/resources/application.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ logging:
3737
commons:
3838
dbcp2: DEBUG
3939

40+
eureka:
41+
client:
42+
serviceUrl:
43+
defaultZone: http://discoveryservice:8761/eureka
44+
4045
---
4146
spring:
4247
profiles: test

0 commit comments

Comments
 (0)