diff --git a/Dockerfile b/Dockerfile index 5650958..47fb4e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM openjdk:8-jre -ADD target/microservices-demo-2.0.0.RELEASE.jar app.jar +ADD target/microservices-demo-2.1.2.RELEASE.jar app.jar EXPOSE 1111 EXPOSE 2222 EXPOSE 3333 diff --git a/README.md b/README.md index 8cd9c80..5036256 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,13 @@ _Note for gradle users:_ to make the intructions below build-tool independent, t ## Versions -Current version (Jan 2021) v2.1.1 corresponds to Spring Boot 2.4.2 and Spring Cloud 2020.0.0 release train. +Current version (Jan 2021) v2.1.2 corresponds to Spring Boot 2.6.15 and Spring Cloud 2023.0.2 release train. Previous versions have been tagged and can be accessed using the `Branch` button above or using `git checkout ` - for example `git checkout v1.2.0`. Tagged versions are: +* v2.1.2 - Spring Boot 2.6.15, Spring Cloud release-train 2023.0.2 * v2.1.1 - Spring Boot 2.4.2, Spring Cloud release-train 2020.0.0 and overdue update to Bootstrap 4 (Jan 2021) * v2.1.0 - Spring Boot 2.4.2 and Spring Cloud release-train 2020.0.0 (Jan 2021) * v2.0.0 - Spring Boot 2.0 and Spring Cloud release-train Finchley (Feb 2020) @@ -27,7 +28,7 @@ If running with Java 11 or later, you need to upgrade the build to include addit ## Using an IDE -You can run the system in your IDE by running the three server classes in order: _RegistrationService_, _AccountsService_ and _WebService_. Each is a Spring Boot application using embedded Tomcat. If using Spring Tools use `Run As ... Spring Boot App` otherwise just run each as a Java application - each has a static `main()` entry point. +You can run the system in your IDE by running the three server classes in order: _RegistrationServer_, _AccountsServer_ and _WebServer_. Each is a Spring Boot application using embedded Tomcat. If using Spring Tools use `Run As ... Spring Boot App` otherwise just run each as a Java application - each has a static `main()` entry point. As discussed in the Blog, open the Eureka dashboard [http://localhost:1111](http://localhost:1111) in your browser to see that the `ACCOUNTS-SERVICE` and `WEB-SERVICE` applications have registered. Next open the Demo Home Page [http://localhost:3333](http://localhost:3333) in and click one of the demo links. @@ -40,7 +41,7 @@ You may find it easier to view the different applications by running them from a For convenience we are building a 'fat' executble jar whose start-class (main method entry-point) is defined to be in the class `io.pivotal.microservices.services.Main`. This application expects a single command-line argument that tells it to run as any of our three servers. ``` -java -jar target/microservices-demo-2.0.0.RELEASE.jar registration|accounts|web +java -jar target/microservices-demo-2.1.2.RELEASE.jar registration|accounts|web ``` ### Procedure @@ -49,10 +50,10 @@ To run the microservices system from the command-line, open three CMD windows (W 1. In each window, change to the directory where you cloned the demo. 1. In the first window, build the application using either `./mvnw clean package` or `./gradlew clean assemble`. Either way the - generated file will be `target/microservices-demo-2.0.0.RELEASE.jar` (even if you used gradle). - 1. In the same window run: `java -jar target/microservices-demo-2.0.0.RELEASE.jar registration` - 1. Switch to the second window and run: `java -jar target/microservices-demo-2.0.0.RELEASE.jar accounts` - 1. In the third window run: `java -jar target/microservices-demo-2.0.0.RELEASE.jar web` + generated file will be `target/microservices-demo-2.1.2.RELEASE.jar` (even if you used gradle). + 1. In the same window run: `java -jar target/microservices-demo-2.1.2.RELEASE.jar registration` + 1. Switch to the second window and run: `java -jar target/microservices-demo-2.1.2.RELEASE.jar accounts` + 1. In the third window run: `java -jar target/microservices-demo-2.1.2.RELEASE.jar web` 1. In your favorite browser open the same two links: [http://localhost:1111](http://localhost:1111) and [http://localhost:3333](http://localhost:3333) You should see servers being registered in the log output of the first (registration) window. @@ -61,7 +62,7 @@ As you interact wiht the Web application, you should logging in the both the sec For a list of valid accounts refer to the [data.sql](https://github.com/paulc4/microservices-demo/blob/master/src/main/resources/testdb/data.sql) that is used by the Account Service to set them up. 1. In a new window, run up a second account-server using HTTP port 2223: - * `java -jar target/microservices-demo-2.0.0.RELEASE.jar accounts 2223` + * `java -jar target/microservices-demo-2.1.2.RELEASE.jar accounts 2223` 1. Allow it to register itself 1. Kill the first account-server and see the web-server switch to using the new account-server - no loss of service. diff --git a/pom.xml b/pom.xml index 28f17b0..ed4dda1 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.springframework.samples.service.service microservices-demo - 2.1.0.RELEASE + 2.1.2.RELEASE jar @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.4.2 + 2.6.15 @@ -78,7 +78,7 @@ org.springframework.cloud spring-cloud-dependencies - 2020.0.0 + 2023.0.2 pom import diff --git a/use-docker.md b/use-docker.md index 0bd2222..220386e 100644 --- a/use-docker.md +++ b/use-docker.md @@ -14,7 +14,7 @@ We are going to run the Accounts Microservice application available at https://g ```sh FROM openjdk:8-jre - ADD target/microservices-demo-1.2.0.RELEASE.jar app.jar + ADD target/microservices-demo-2.1.2.RELEASE.jar app.jar EXPOSE 1111 EXPOSE 2222 EXPOSE 3333