diff --git a/fortune-teller-fortune-service/pom.xml b/fortune-teller-fortune-service/pom.xml index 70260a6..a3a4a10 100644 --- a/fortune-teller-fortune-service/pom.xml +++ b/fortune-teller-fortune-service/pom.xml @@ -1,83 +1,83 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - io.spring.cloud.samples - fortune-teller-fortune-service - 0.0.1-SNAPSHOT - jar + fortune-teller-fortune-service + 0.0.1-SNAPSHOT + jar - fortune-teller-fortune-service - Fortunes Service + fortune-teller-fortune-service + Fortunes Service - - io.spring.cloud.samples - fortune-teller - 0.0.1-SNAPSHOT - + + io.spring.cloud.samples + fortune-teller + 0.0.1-SNAPSHOT + - - io.spring.cloud.samples.fortuneteller.fortuneservice.Application - + + io.spring.cloud.samples.fortuneteller.fortuneservice.Application + - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-security - - - org.springframework.boot - spring-boot-starter-data-jpa - - - io.pivotal.spring.cloud - spring-cloud-services-starter-config-client - - - io.pivotal.spring.cloud - spring-cloud-services-starter-service-registry - - - org.hsqldb - hsqldb - - - postgresql - postgresql - 9.1-901-1.jdbc4 - - - org.mariadb.jdbc - mariadb-java-client - 2.2.6 - - + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-data-jpa + + + io.pivotal.spring.cloud + spring-cloud-services-starter-config-client + + + io.pivotal.spring.cloud + spring-cloud-services-starter-service-registry + + + org.hsqldb + hsqldb + + + postgresql + postgresql + 9.1-901-1.jdbc4 + + + org.mariadb.jdbc + mariadb-java-client + 2.2.6 + + + org.hibernate + hibernate-validator + 6.0.17.Final + + - - - - au.com.dius - pact-jvm-provider-maven_2.11 - 2.1.13 - - - - FortuneService - - - FortuneUi - ../fortune-teller-ui/target/pacts/FortuneUi-FortuneService.json - - - - - - - - + + + + au.com.dius + pact-jvm-provider-maven_2.11 + 2.1.13 + + + + FortuneService + + + FortuneUi + ../fortune-teller-ui/target/pacts/FortuneUi-FortuneService.json + + + + + + + + diff --git a/fortune-teller-fortune-service/src/main/java/io/spring/cloud/samples/fortuneteller/fortuneservice/controllers/FortuneController.java b/fortune-teller-fortune-service/src/main/java/io/spring/cloud/samples/fortuneteller/fortuneservice/controllers/FortuneController.java index f0a962f..97c522e 100644 --- a/fortune-teller-fortune-service/src/main/java/io/spring/cloud/samples/fortuneteller/fortuneservice/controllers/FortuneController.java +++ b/fortune-teller-fortune-service/src/main/java/io/spring/cloud/samples/fortuneteller/fortuneservice/controllers/FortuneController.java @@ -37,7 +37,7 @@ public Iterable fortunes() { @RequestMapping("/random") public Fortune randomFortune() { - List randomFortunes = repository.randomFortunes(new PageRequest(0, 1)); + List randomFortunes = repository.randomFortunes(PageRequest.of(0, 1)); return randomFortunes.get(0); } } diff --git a/fortune-teller-fortune-service/src/main/java/io/spring/cloud/samples/fortuneteller/fortuneservice/respositories/FortuneRepository.java b/fortune-teller-fortune-service/src/main/java/io/spring/cloud/samples/fortuneteller/fortuneservice/respositories/FortuneRepository.java index 1ba85fb..020f2d2 100644 --- a/fortune-teller-fortune-service/src/main/java/io/spring/cloud/samples/fortuneteller/fortuneservice/respositories/FortuneRepository.java +++ b/fortune-teller-fortune-service/src/main/java/io/spring/cloud/samples/fortuneteller/fortuneservice/respositories/FortuneRepository.java @@ -24,6 +24,6 @@ public interface FortuneRepository extends PagingAndSortingRepository { - @Query("select fortune from Fortune fortune order by RAND()") - public List randomFortunes(Pageable pageable); + @Query(value = "select fortune from Fortune fortune order by RAND()") + List randomFortunes(Pageable pageable); } diff --git a/fortune-teller-ui/pom.xml b/fortune-teller-ui/pom.xml index 766c23f..7f91591 100644 --- a/fortune-teller-ui/pom.xml +++ b/fortune-teller-ui/pom.xml @@ -1,47 +1,47 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - io.spring.cloud.samples - fortune-teller-ui - 0.0.1-SNAPSHOT - jar + fortune-teller-ui + 0.0.1-SNAPSHOT + jar - fortune-teller-ui - Fortune Teller UI + fortune-teller-ui + Fortune Teller UI - - io.spring.cloud.samples - fortune-teller - 0.0.1-SNAPSHOT - ../pom.xml - + + io.spring.cloud.samples + fortune-teller + 0.0.1-SNAPSHOT + ../pom.xml + - - io.spring.cloud.samples.fortuneteller.ui.Application - + + io.spring.cloud.samples.fortuneteller.ui.Application + - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-security - - - io.pivotal.spring.cloud - spring-cloud-services-starter-config-client - - - io.pivotal.spring.cloud - spring-cloud-services-starter-service-registry - - - io.pivotal.spring.cloud - spring-cloud-services-starter-circuit-breaker - - + + + org.springframework.boot + spring-boot-starter-security + + + io.pivotal.spring.cloud + spring-cloud-services-starter-config-client + + + io.pivotal.spring.cloud + spring-cloud-services-starter-service-registry + + + io.pivotal.spring.cloud + spring-cloud-services-starter-circuit-breaker + + + org.hibernate + hibernate-validator + 6.0.17.Final + + diff --git a/manifest-pcf.yml b/manifest-pcf.yml index 962d018..97a05c4 100644 --- a/manifest-pcf.yml +++ b/manifest-pcf.yml @@ -2,7 +2,7 @@ applications: - name: fortune-service memory: 1024M - host: fortunes + random-route: true path: fortune-teller-fortune-service/target/fortune-teller-fortune-service-0.0.1-SNAPSHOT.jar services: - fortunes-db @@ -13,7 +13,7 @@ applications: #CF_TARGET: https://api.yourpcfenvironment.local - name: fortune-ui memory: 1024M - host: fortunes-ui + random-route: true path: fortune-teller-ui/target/fortune-teller-ui-0.0.1-SNAPSHOT.jar services: - config-server diff --git a/pom.xml b/pom.xml index c68ec67..22d5860 100644 --- a/pom.xml +++ b/pom.xml @@ -18,8 +18,7 @@ org.springframework.boot spring-boot-starter-parent - 2.0.4.RELEASE - + 2.1.8.RELEASE @@ -28,20 +27,19 @@ - - org.springframework.boot - spring-boot-starter-web - org.springframework.boot spring-boot-starter-actuator - org.springframework.boot spring-boot-starter-test test + + org.springframework.boot + spring-boot-starter-web + au.com.dius pact-jvm-consumer-junit_2.11 @@ -61,14 +59,14 @@ io.pivotal.spring.cloud spring-cloud-services-dependencies - 2.0.1.RELEASE + 2.1.4.RELEASE pom import org.springframework.cloud spring-cloud-dependencies - Finchley.RELEASE + Greenwich.SR3 pom import