Upgraded to work with the Eventuate client framework version 0.12
See http://eventuate.io/docs/java/spring-configuration.html for details on new configuration properties. Upgraded to Spring Boot 1.2.8 Misc changes to build scripts
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
dependencies {
|
||||
compile "org.scala-lang:scala-library:2.10.2"
|
||||
compile project(":common-backend")
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-client-event-handling:$eventStoreClientVersion"
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-client-event-handling_2.10:$eventStoreClientVersion"
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ dependencies {
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-actuator"
|
||||
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-http-stomp-client:$eventStoreClientVersion"
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-http-stomp-client_2.10:$eventStoreClientVersion"
|
||||
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
testCompile scalaTestDependency
|
||||
|
||||
@@ -7,13 +7,10 @@ dependencies {
|
||||
compile "org.scala-lang:scala-library:2.10.2"
|
||||
compile "org.springframework.boot:spring-boot-starter-data-mongodb:$springBootVersion"
|
||||
|
||||
compile "net.chrisrichardson.eventstore.common:eventstore-common:$eventStoreCommonVersion"
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-client-event-handling:$eventStoreClientVersion"
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-java-client_2.10:$eventStoreClientVersion"
|
||||
|
||||
testCompile scalaTestDependency
|
||||
|
||||
testCompile "junit:junit:4.11"
|
||||
testCompile "net.chrisrichardson.eventstore.client:eventstore-jdbc:$eventStoreClientVersion"
|
||||
testCompile "net.chrisrichardson.eventstore.client:eventstore-jdbc_2.10:$eventStoreClientVersion"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ dependencies {
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-actuator"
|
||||
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-http-stomp-client:$eventStoreClientVersion"
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-http-stomp-client_2.10:$eventStoreClientVersion"
|
||||
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
testCompile scalaTestDependency
|
||||
|
||||
@@ -12,7 +12,7 @@ dependencies {
|
||||
testCompile scalaTestDependency
|
||||
|
||||
testCompile "junit:junit:4.11"
|
||||
testCompile "net.chrisrichardson.eventstore.client:eventstore-jdbc:$eventStoreClientVersion"
|
||||
testCompile "net.chrisrichardson.eventstore.client:eventstore-jdbc_2.10:$eventStoreClientVersion"
|
||||
}
|
||||
|
||||
|
||||
|
||||
3
scala-spring/build-and-test-all.sh
Executable file
3
scala-spring/build-and-test-all.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
../_build-and-test-all.sh $*
|
||||
@@ -23,13 +23,7 @@ subprojects {
|
||||
targetCompatibility = 1.7
|
||||
|
||||
repositories {
|
||||
|
||||
if (project.hasProperty("localMavenRepoUrl")) {
|
||||
project.localMavenRepoUrl.split(',').each { theUrl ->
|
||||
maven { url theUrl }
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
maven { url "https://06c59145-4e83-4f22-93ef-6a7eee7aebaa.repos.chrisrichardson.net.s3.amazonaws.com" }
|
||||
eventuateMavenRepoUrl.split(',').each { repoUrl -> maven { url repoUrl } }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,10 @@ class VerifyEventStoreEnvironmentPlugin implements Plugin<Project> {
|
||||
project.test {
|
||||
beforeSuite { x ->
|
||||
if (x.parent == null) {
|
||||
if (System.getenv("EVENT_STORE_URL") == null)
|
||||
logger.warn("\nPLEASE make sure that Event Store-related environment variables including EVENT_STORE_URL are set, see sample-set-remote-env.sh !!!!\n")
|
||||
if (System.getenv("EVENTUATE_API_KEY_ID") == null && System.getenv("EVENTUATE_API_KEY_SECRET") == null)
|
||||
logger.warn("\nPLEASE make sure that Eventuate-related environment variables EVENTUATE_API_KEY_ID and EVENTUATE_API_KEY_SECRET are set, see sample-set-remote-env.sh !!!!\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,9 @@ apply plugin: 'scala'
|
||||
|
||||
dependencies {
|
||||
compile "org.scala-lang:scala-library:2.10.2"
|
||||
compile "net.chrisrichardson.eventstore.common:eventstore-common:$eventStoreCommonVersion"
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-java-client_2.10:$eventStoreClientVersion"
|
||||
|
||||
testCompile scalaTestDependency
|
||||
|
||||
testCompile "junit:junit:4.11"
|
||||
}
|
||||
|
||||
|
||||
|
||||
22
scala-spring/common-backend/src/main/resources/logback.xml
Normal file
22
scala-spring/common-backend/src/main/resources/logback.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
|
||||
<!-- [%thread] -->
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<layout class="ch.qos.logback.classic.PatternLayout">
|
||||
<Pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</Pattern>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<root level="error">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
|
||||
<logger name="org.springframework" level='info'>
|
||||
</logger>
|
||||
|
||||
<logger name="net.chrisrichardson.eventstore.client" level='info'>
|
||||
</logger>
|
||||
|
||||
</configuration>
|
||||
46
scala-spring/docker-compose.yml
Normal file
46
scala-spring/docker-compose.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
accountscommandside:
|
||||
image: java:8
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./accounts-command-side-service/build/libs:/app
|
||||
command: java -jar /app/accounts-command-side-service.jar
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
EVENTUATE_API_KEY_ID:
|
||||
EVENTUATE_API_KEY_SECRET:
|
||||
|
||||
transactionscommandside:
|
||||
image: java:8
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./transactions-command-side-service/build/libs:/app
|
||||
command: java -jar /app/transactions-command-side-service.jar
|
||||
ports:
|
||||
- "8082:8080"
|
||||
environment:
|
||||
EVENTUATE_API_KEY_ID:
|
||||
EVENTUATE_API_KEY_SECRET:
|
||||
|
||||
|
||||
accountsqueryside:
|
||||
image: java:8
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./accounts-query-side-service/build/libs:/app
|
||||
command: java -jar /app/accounts-query-side-service.jar
|
||||
ports:
|
||||
- "8081:8080"
|
||||
links:
|
||||
- mongodb
|
||||
environment:
|
||||
EVENTUATE_API_KEY_ID:
|
||||
EVENTUATE_API_KEY_SECRET:
|
||||
SPRING_DATA_MONGODB_URI: mongodb://mongodb/mydb
|
||||
|
||||
mongodb:
|
||||
image: mongo:3.0.4
|
||||
hostname: mongodb
|
||||
command: mongod --smallfiles
|
||||
ports:
|
||||
- "27017:27017"
|
||||
@@ -18,9 +18,10 @@ import scala.collection.JavaConversions._
|
||||
@RunWith(classOf[JUnitRunner])
|
||||
class EndToEndTest extends FlatSpec {
|
||||
|
||||
val accountsCommandSideBaseUrl = s"http://localhost:8080/"
|
||||
val accountsQuerySideBaseUrl = s"http://localhost:8081/"
|
||||
val transactionsCommandSideBaseUrl = s"http://localhost:8082/"
|
||||
val serviceHost = Option(System.getenv("SERVICE_HOST")) getOrElse "localhost"
|
||||
val accountsCommandSideBaseUrl = s"http://$serviceHost:8080/"
|
||||
val accountsQuerySideBaseUrl = s"http://$serviceHost:8081/"
|
||||
val transactionsCommandSideBaseUrl = s"http://$serviceHost:8082/"
|
||||
|
||||
val restTemplate = new RestTemplate()
|
||||
restTemplate.getMessageConverters foreach {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
|
||||
org.gradle.jvmargs=-XX:MaxPermSize=512m
|
||||
|
||||
eventuateMavenRepoUrl=http://mavenrepo.eventuate.io/release
|
||||
|
||||
scalaTestDependency=org.scalatest:scalatest_2.10:2.0
|
||||
|
||||
springBootVersion=1.2.5.RELEASE
|
||||
springBootVersion=1.2.8.RELEASE
|
||||
|
||||
eventStoreClientVersion=0.7
|
||||
eventStoreCommonVersion=0.7
|
||||
eventStoreClientVersion=0.12
|
||||
|
||||
@@ -11,7 +11,7 @@ dependencies {
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-actuator"
|
||||
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-jdbc:$eventStoreClientVersion"
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-jdbc_2.10:$eventStoreClientVersion"
|
||||
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
testCompile scalaTestDependency
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dependencies {
|
||||
compile "org.scala-lang:scala-library:2.10.2"
|
||||
compile project(":common-backend")
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-client-event-handling:$eventStoreClientVersion"
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-client-event-handling_2.10:$eventStoreClientVersion"
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ dependencies {
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-actuator"
|
||||
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-http-stomp-client:$eventStoreClientVersion"
|
||||
compile "net.chrisrichardson.eventstore.client:eventstore-http-stomp-client_2.10:$eventStoreClientVersion"
|
||||
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
testCompile scalaTestDependency
|
||||
|
||||
Reference in New Issue
Block a user