Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot 2.6.15, Spring Cloud release-train 2023.0.2 #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <version>` - 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)
Expand All @@ -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.

Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.samples.service.service</groupId>
<artifactId>microservices-demo</artifactId>
<version>2.1.0.RELEASE</version>
<version>2.1.2.RELEASE</version>
<packaging>jar</packaging>

<properties>
Expand All @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.2</version>
<version>2.6.15</version>
</parent>

<dependencies>
Expand Down Expand Up @@ -78,7 +78,7 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>2020.0.0</version>
<version>2023.0.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion use-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down