You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Bump to Chaos Monkey 3.1.0 (spring-petclinic#264)
* Bump org.webjars:bootstrap from 3.3.7-1 to 3.4.0 in /spring-petclinic-api-gateway (spring-petclinic#269)
* Bump org.webjars:bootstrap in /spring-petclinic-api-gateway
Bumps [org.webjars:bootstrap](https://github.com/webjars/bootstrap) from 3.3.7-1 to 3.4.0.
- [Commits](webjars/bootstrap@bootstrap-3.3.7-1...bootstrap-3.4.0)
---
updated-dependencies:
- dependency-name: org.webjars:bootstrap
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <[email protected]>
* Report bootstrap version to wro4j.xml
---------
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Antoine Rey <[email protected]>
* Add Dev Container configuration (spring-petclinic#271)
* Add Dev Container configuration
* Remove the postCreateCommand
* Add configuration tips for VS Code in Dev Container
* Add GitHub Codespaces badge
* Bump to Spring Cloud 2023.0.3 and Spring Boot 3.2.7 (spring-petclinic#272)
* Bootstrap 5 with SCSS migration (spring-petclinic#273)
* Bootstrap 5 with SCSS migration
* Bump Angular version
* Remove class="container"
* Upgrade to Maven 3.9.8 and Maven Wrapper 3.3.2 (spring-petclinic#274)
* Disable Github linguist support for CSS
* Add Microservices Overview to readme (spring-petclinic#276)
* Added text file
* Delete Text File
* Update microservices overview in README file
---------
Co-authored-by: TayJieHao386 <[email protected]>
* Add user friendly error when Java < 17 is used (Issue spring-petclinic#280) (spring-petclinic#286)
* Add user friendly error when Java < 17 is used (Issue spring-petclinic#280)
* pom.xml updated
* java version property updated
* Removed Bracket [Issue spring-petclinic#280] fixed build
* Generative AI support for Spring Petclinic Microservices (spring-petclinic#281)
* updated git ignore
* New microservice for generative ai chatbot based on Spring AI. Supports listing vets, listing owners, adding owners and adding pets to owners
* Update README.md
* Use webjar as webjar
* Externalise JavaScript for handling chatbox interaction
* Use @PostMapping for the /fallback endpoint
* Configure the /fallback uri for the POST verb only
* Move the spring-ai.png to the docs directory
* Switch by default to the openai demo account
* Use lambda expression
* Remove Lombok from the genai-service
* Remove creds.yaml
* Fix SonarQube issues
* Fix SonarQube issues (second attempt)
* Add the genai-service
* Use lambda expression
* Fix Docker warnings
* Setting the GenAI environment variables
---------
Co-authored-by: Antoine Rey <[email protected]>
* Add "Open with Codeanywhere" badge to README.md (spring-petclinic#292)
* Get rid of Lombok spring-petclinic#251 (spring-petclinic#300)
* Bump to Spring Cloud 2024 and Spring Boot 3.4.1 (spring-petclinic#302)
* Externalise the genai-service configuration (spring-petclinic#301)
* JetBrains support for Open-Source Projects (spring-petclinic#304)
* small fixes
---------
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Antoine Rey <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wong Jia Cin <[email protected]>
Co-authored-by: TayJieHao386 <[email protected]>
Co-authored-by: Ankush Thakur <[email protected]>
Co-authored-by: odedia <[email protected]>
Co-authored-by: Nikola Balic <[email protected]>
@@ -7,15 +7,20 @@ This microservices branch was initially derived from [AngularJS version](https:/
7
7
To achieve that goal, we use Spring Cloud Gateway, Spring Cloud Circuit Breaker, Spring Cloud Config, Micrometer Tracing, Resilience4j, Open Telemetry
8
8
and the Eureka Service Discovery from the [Spring Cloud Netflix](https://github.com/spring-cloud/spring-cloud-netflix) technology stack.
9
9
10
+
[](https://codespaces.new/spring-petclinic/spring-petclinic-microservices)
11
+
12
+
[](https://app.codeanywhere.com/#https://github.com/spring-petclinic/spring-petclinic-microservices)
13
+
10
14
## Starting services locally without Docker
11
15
12
-
Every microservice is a Spring Boot application and can be started locally using IDE ([Lombok](https://projectlombok.org/) plugin has to be set up) or `../mvnw spring-boot:run` command. Please note that supporting services (Config and Discovery Server) must be started before any other application (Customers, Vets, Visits and API).
16
+
Every microservice is a Spring Boot application and can be started locally using IDE or `../mvnw spring-boot:run` command.
17
+
Please note that supporting services (Config and Discovery Server) must be started before any other application (Customers, Vets, Visits and API).
13
18
Startup of Tracing server, Admin server, Grafana and Prometheus is optional.
14
19
If everything goes well, you can access the following services at given location:
* Customers, Vets, Visits and GenAI Services - random port, check Eureka Dashboard
19
24
* Tracing Server (Zipkin) - http://localhost:9411/zipkin/ (we use [openzipkin](https://github.com/openzipkin/zipkin/tree/main/zipkin-server))
20
25
* Admin Server (Spring Boot Admin) - http://localhost:9090
21
26
* Grafana Dashboards - http://localhost:3000
@@ -52,7 +57,7 @@ For instance, if you target container images for an Apple M2, you could use the
52
57
```
53
58
54
59
Once images are ready, you can start them with a single command
55
-
`docker-compose up` or `podman-compose up`.
60
+
`dockercompose up` or `podman-compose up`.
56
61
57
62
Containers startup order is coordinated with the `service_healthy` condition of the Docker Compose [depends-on](https://github.com/compose-spec/compose-spec/blob/main/spec.md#depends_on) expression
58
63
and the [healthcheck](https://github.com/compose-spec/compose-spec/blob/main/spec.md#healthcheck) of the service containers.
@@ -79,13 +84,62 @@ Each of the java based applications is started with the `chaos-monkey` profile i
79
84
80
85
You can then access petclinic here: http://localhost:8080/
81
86
87
+
## Microservices Overview
88
+
89
+
This project consists of several microservices:
90
+
-**Customers Service**: Manages customer data.
91
+
-**Vets Service**: Handles information about veterinarians.
92
+
-**Visits Service**: Manages pet visit records.
93
+
-**GenAI Service**: Provides a chatbot interface to the application.
94
+
-**API Gateway**: Routes client requests to the appropriate services.
95
+
-**Config Server**: Centralized configuration management for all services.
96
+
-**Discovery Server**: Eureka-based service registry.
97
+
98
+
Each service has its own specific role and communicates via REST APIs.
Spring Petclinic integrates a Chatbot that allows you to interact with the application in a natural language. Here are some examples of what you could ask:
111
+
112
+
1. Please list the owners that come to the clinic.
113
+
2. Are there any vets that specialize in surgery?
114
+
3. Is there an owner named Betty?
115
+
4. Which owners have dogs?
116
+
5. Add a dog for Betty. Its name is Moopsie.
117
+
6. Create a new owner.
118
+
119
+

120
+
121
+
This `spring-petlinic-genai-service` microservice currently supports **OpenAI** (default) or **Azure's OpenAI** as the LLM provider.
122
+
In order to start the microservice, perform the following steps:
123
+
124
+
1. Decide which provider you want to use. By default, the `spring-ai-openai-spring-boot-starter` dependency is enabled.
125
+
You can change it to `spring-ai-azure-openai-spring-boot-starter`in the `pom.xml`.
126
+
2. Create an OpenAI API key or a Azure OpenAI resource in your Azure Portal.
127
+
Refer to the [OpenAI's quickstart](https://platform.openai.com/docs/quickstart) or [Azure's documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/) for further information on how to obtain these.
128
+
You only need to populate the provider you're using - either openai, or azure-openai.
129
+
If you don't have your own OpenAI API key, don't worry!
130
+
You can temporarily use the `demo` key, which OpenAI provides free of charge for demonstration purposes.
131
+
This `demo` key has a quota, is limited to the `gpt-4o-mini` model, and is intended solely for demonstration use.
132
+
With your own OpenAI account, you can test the `gpt-4o` model by modifying the `deployment-name` property of the `application.yml` file.
133
+
3. Export your API keys and endpoint as environment variables:
## In case you find a bug/suggested improvement for Spring Petclinic Microservices
91
145
@@ -207,6 +261,17 @@ Be sure to turn on "Use containerd for pulling and storing images" in the Docker
207
261
The `scripts/pushImages.sh` and `scripts/tagImages.sh` shell scripts could also be used once you build your image with the `buildDocker` maven profile.
208
262
The `scripts/tagImages.sh` requires to declare the `VERSION` env variable.
209
263
264
+
## Compiling the CSS
265
+
266
+
There is a `petclinic.css` in `spring-petclinic-api-gateway/src/main/resources/static/css`.
267
+
It was generated from the `petclinic.scss` source, combined with the [Bootstrap](https://getbootstrap.com/) library.
268
+
If you make changes to the `scss`, or upgrade Bootstrap, you will need to re-compile the CSS resources
269
+
using the Maven profile `css` of the `spring-petclinic-api-gateway`module.
270
+
```bash
271
+
cd spring-petclinic-api-gateway
272
+
mvn generate-resources -P css
273
+
```
274
+
210
275
## Interesting Spring Petclinic forks
211
276
212
277
The Spring Petclinic `main` branch in the main [spring-projects](https://github.com/spring-projects/spring-petclinic)
@@ -228,7 +293,11 @@ For pull requests, editor preferences are available in the [editor config](.edit
For more information about testing the custom soap service and client, please refer to the [README](spring-petclinic-soap-service/README.md) in the soap folder.
0 commit comments