ewolff / microservice

Sample of a Microservice setup for my book. Based on Spring Cloud / Netflix / Java / Docker / Docker Compose / Docker Machine / Vagrant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build errors, openjdk 11, ubuntu 18.04

Dani13567 opened this issue · comments

commented

Build, ends up in the following errors:

[INFO] Reactor Summary:
[INFO]
[INFO] microservice-demo 0.0.1-SNAPSHOT ................... SUCCESS [ 3.459 s]
[INFO] microservice-demo-eureka-server .................... SUCCESS [ 29.669 s]
[INFO] microservice-demo-turbine-server ................... SUCCESS [ 0.945 s]
[INFO] microservice-demo-customer ......................... FAILURE [ 44.390 s]
[INFO] microservice-demo-catalog .......................... SKIPPED
[INFO] microservice-demo-order ............................ SKIPPED
[INFO] microservice-demo-zuul-server 0.0.1-SNAPSHOT ....... SKIPPED

3 errors are issued:

[ERROR] testFindAll(com.ewolff.microservice.customer.cdc.CustomerConsumerDrivenContractTest) Time elapsed: 0 s <<< ERROR!
[ERROR] testValidCustomerId(com.ewolff.microservice.customer.cdc.CustomerConsumerDrivenContractTest) Time elapsed: 0 s <<< ERROR!
[ERROR] testGetOne(com.ewolff.microservice.customer.cdc.CustomerConsumerDrivenContractTest) Time elapsed: 0 s <<< ERROR!

Out of curiosity, does this example uses any database? I couldn't find one...

commented

According to https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-with-Java-9-and-above

Java 11 is supported as of Spring Boot 2.1.0.M2.

issue resolved after editing pom.xml to use the latest version:

<parent>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-parent</artifactId>
                <version>2.1.4.RELEASE</version>
                <relativePath /> <!-- lookup parent from repository -->
</parent>

The example uses HSQL, a Java-based in memory database.
You should probably use Spring Boot 2.1.3 and Spring Cloud Greenwich.SR1 . I am not sure whether Spring Cloud Finchley works with Spring Boot 2.1.4.