|
| 1 | +:experimental: |
| 2 | +// Define unicode for Apple Command key. |
| 3 | +:commandkey: ⌘ |
| 4 | + |
| 5 | += Java Microservices with Spring Boot and Spring Cloud |
| 6 | + |
| 7 | +The brackets at the end of each step indicate the alias's or IntelliJ Live Templates to use. You can find the template definitions at https://github.com/mraible/idea-live-templates[mraible/idea-live-templates]. |
| 8 | + |
| 9 | +== Create Eureka Server, Car Service, and API Gateway |
| 10 | + |
| 11 | +. Create a Eureka Server |
| 12 | + |
| 13 | + http https://start.spring.io/starter.zip javaVersion==11 \ |
| 14 | + artifactId==discovery-service name==eureka-service \ |
| 15 | + dependencies==cloud-eureka-server baseDir==discovery-service | tar -xzvf - |
| 16 | + |
| 17 | +. Create a Car Service |
| 18 | + |
| 19 | + http https://start.spring.io/starter.zip \ |
| 20 | + artifactId==car-service name==car-service baseDir==car-service \ |
| 21 | + dependencies==actuator,cloud-eureka,data-jpa,h2,data-rest,web,devtools,lombok | tar -xzvf - |
| 22 | + |
| 23 | +. Create an API Gateway |
| 24 | + |
| 25 | + http https://start.spring.io/starter.zip \ |
| 26 | + artifactId==api-gateway name==api-gateway baseDir==api-gateway \ |
| 27 | + dependencies==cloud-eureka,cloud-feign,data-rest,web,cloud-hystrix,lombok | tar -xzvf - |
| 28 | + |
| 29 | +. Install Java 11 with SDKMAN! https://sdkman.io/ |
| 30 | + |
| 31 | + sdk list java |
| 32 | + sdk install java 11.0.2-open |
| 33 | + sdk default java 11.0.2-open |
| 34 | + |
| 35 | +. Add JAXB to `discovery-service` so it works with Java 11 |
| 36 | + |
| 37 | + <dependency> |
| 38 | + <groupId>org.glassfish.jaxb</groupId> |
| 39 | + <artifactId>jaxb-runtime</artifactId> |
| 40 | + </dependency> |
| 41 | + |
| 42 | +... to be continued ... |
| 43 | + |
| 44 | +== Learn More! |
| 45 | + |
| 46 | +. GitHub repo: https://github.com/oktadeveloper/java-microservices-examples |
| 47 | + |
| 48 | +. Blog post: https://developer.okta.com/blog/2019/05/22/java-microservices-spring-boot-spring-cloud |
0 commit comments