From f1cb59f812f905c69ddd4c5a9be9c80ee42420be Mon Sep 17 00:00:00 2001 From: alexmond Date: Sat, 27 Sep 2025 22:23:41 -0400 Subject: [PATCH] Restructured multiple modules: introduced `spring-boot-ai-samples` and `spring-boot-config-server`, updated package names across modules for consistency, adjusted Java version to `17` in all `pom.xml` files, added missing licenses and developer info, and enhanced configurations with additional profiles and dependencies. --- .github/workflows/maven.yml | 4 +- .../SpringBootOpenapiApplication.xml | 2 +- TODO | 7 +- docs/antora.yml | 6 + docs/modules/ROOT/nav.adoc | 1 + docs/modules/ROOT/pages/index.adoc | 187 +++++++++++ docs/modules/ROOT/partials/_hconfigprops.adoc | 18 + docs/modules/ROOT/partials/_sconfigprops.adoc | 28 ++ pom.xml | 19 +- .../openapi/src/main/AndroidManifest.xml | 2 +- spring-boot-admin-server/pom.xml | 76 +++++ .../cloud/HttpExchangeConfiguration.java | 16 + .../SimpleBootAdminSampleApplication.java | 15 + .../src/main/resources/application.yaml | 44 +++ spring-boot-ai-samples/pom.xml | 32 ++ .../spring-boot-ai-sample/pom.xml | 111 +++++++ .../alexmond/ai/SpringBootAiApplication.java | 12 + .../java/org/alexmond/ai/config/AiConfig.java | 14 + .../org/alexmond/ai/config/DataLoader.java | 41 +++ .../ai/controller/ChatController.java | 67 ++++ .../java/org/alexmond/ai/dto/ChatRequest.java | 13 + .../org/alexmond/ai/dto/ChatResponse.java | 16 + .../org/alexmond/ai/entity/ChatMessage.java | 39 +++ .../ai/repository/ChatMessageRepository.java | 15 + .../alexmond/ai/service/AiChatService.java | 86 +++++ .../src/main/resources/application.yaml | 43 +++ .../src/main/resources/templates/chat.html | 308 ++++++++++++++++++ spring-boot-config-sample/pom.xml | 3 +- .../SpringBootConfigSampleApplication.java | 2 +- .../config/{ => config}/ConfigSample.java | 7 +- .../{ => config}/ConfigSampleNested.java | 2 +- .../controller/ConfigPrintRest.java | 4 +- ...impleBootConfigSampleApplicationTests.java | 2 +- .../local-config/application.yaml | 14 + .../local-config/bootstrap.yaml | 2 + .../local-config/config-repo/application.yaml | 45 +++ .../config-repo/default-spring-service.yaml | 27 ++ .../config-repo/default-spring-service2.yaml | 35 ++ .../config-repo/spring-boot-admin-server.yaml | 0 .../config-repo/spring-boot-gateway.yaml | 0 .../local-config/gateway.yaml | 77 +++++ spring-boot-config-server/pom.xml | 51 +++ .../cloud/HttpExchangeConfiguration.java | 16 + .../SpringBootConfigServerApplication.java | 15 + .../src/main/resources/application.yaml | 39 +++ spring-boot-data-jpa-flyway/.gitattributes | 2 - spring-boot-data-jpa-flyway/.gitignore | 33 -- spring-boot-data-jpa-flyway/pom.xml | 26 +- .../SimpleBootRestSampleApplicationTests.java | 2 + spring-boot-openapi-root/pom.xml | 15 +- .../spring-boot-openapi-client/pom.xml | 2 +- .../spring-boot-openapi/pom.xml | 13 +- .../openapi}/HelloWorldRest.java | 2 +- .../SpringBootOpenapiApplication.java | 2 +- .../auth/controller/UserController.java | 6 +- .../sample/{ => openapi}/auth/model/User.java | 4 +- .../repository/UserRepository.java | 4 +- .../SimpleBootRestSampleApplicationTests.java | 2 +- spring-boot-rest-sample/pom.xml | 27 +- .../rest}/HelloWorldRest.java | 2 +- .../SimpleBootRestSampleApplication.java | 2 +- .../SimpleBootRestSampleApplicationTests.java | 2 +- spring-boot-security-root/pom.xml | 16 +- .../simple-boot-auth-client/pom.xml | 3 +- .../spring-boot-custom-auth-server/pom.xml | 2 +- spring-boot-thymeleaf/pom.xml | 15 +- .../spring-boot-thymeleaf-layout/pom.xml | 2 +- .../thymeleaf/layout}/MainController.java | 8 +- ...gBootThymeleafLayoutSampleApplication.java | 2 +- .../SimpleBootRestSampleApplicationTests.java | 12 + .../spring-boot-thymeleaf-sample/pom.xml | 2 +- .../SpringBootThymeleafSampleApplication.java | 2 +- .../auth/controller/FormController.java | 2 +- .../auth/controller/HomeController.java | 2 +- .../auth/controller/ProductController.java | 6 +- .../auth/controller/UserController.java | 8 +- .../{ => thymeleaf}/auth/model/Address.java | 2 +- .../{ => thymeleaf}/auth/model/Product.java | 2 +- .../{ => thymeleaf}/auth/model/User.java | 2 +- .../{ => thymeleaf}/auth/model/UserRole.java | 2 +- .../auth/service/ProductService.java | 4 +- .../auth/service/UserService.java | 8 +- 82 files changed, 1685 insertions(+), 126 deletions(-) create mode 100644 docs/antora.yml create mode 100644 docs/modules/ROOT/nav.adoc create mode 100644 docs/modules/ROOT/pages/index.adoc create mode 100644 docs/modules/ROOT/partials/_hconfigprops.adoc create mode 100644 docs/modules/ROOT/partials/_sconfigprops.adoc create mode 100644 spring-boot-admin-server/pom.xml create mode 100644 spring-boot-admin-server/src/main/java/org/alexmond/sample/cloud/HttpExchangeConfiguration.java create mode 100644 spring-boot-admin-server/src/main/java/org/alexmond/sample/cloud/SimpleBootAdminSampleApplication.java create mode 100644 spring-boot-admin-server/src/main/resources/application.yaml create mode 100644 spring-boot-ai-samples/pom.xml create mode 100644 spring-boot-ai-samples/spring-boot-ai-sample/pom.xml create mode 100644 spring-boot-ai-samples/spring-boot-ai-sample/src/main/java/org/alexmond/ai/SpringBootAiApplication.java create mode 100644 spring-boot-ai-samples/spring-boot-ai-sample/src/main/java/org/alexmond/ai/config/AiConfig.java create mode 100644 spring-boot-ai-samples/spring-boot-ai-sample/src/main/java/org/alexmond/ai/config/DataLoader.java create mode 100644 spring-boot-ai-samples/spring-boot-ai-sample/src/main/java/org/alexmond/ai/controller/ChatController.java create mode 100644 spring-boot-ai-samples/spring-boot-ai-sample/src/main/java/org/alexmond/ai/dto/ChatRequest.java create mode 100644 spring-boot-ai-samples/spring-boot-ai-sample/src/main/java/org/alexmond/ai/dto/ChatResponse.java create mode 100644 spring-boot-ai-samples/spring-boot-ai-sample/src/main/java/org/alexmond/ai/entity/ChatMessage.java create mode 100644 spring-boot-ai-samples/spring-boot-ai-sample/src/main/java/org/alexmond/ai/repository/ChatMessageRepository.java create mode 100644 spring-boot-ai-samples/spring-boot-ai-sample/src/main/java/org/alexmond/ai/service/AiChatService.java create mode 100644 spring-boot-ai-samples/spring-boot-ai-sample/src/main/resources/application.yaml create mode 100644 spring-boot-ai-samples/spring-boot-ai-sample/src/main/resources/templates/chat.html rename spring-boot-config-sample/src/main/java/org/alexmond/sample/{ => config}/SpringBootConfigSampleApplication.java (90%) rename spring-boot-config-sample/src/main/java/org/alexmond/sample/config/{ => config}/ConfigSample.java (89%) rename spring-boot-config-sample/src/main/java/org/alexmond/sample/config/{ => config}/ConfigSampleNested.java (76%) rename spring-boot-config-sample/src/main/java/org/alexmond/sample/{ => config}/controller/ConfigPrintRest.java (78%) rename spring-boot-config-sample/src/test/java/org/alexmond/sample/{ => config}/SimpleBootConfigSampleApplicationTests.java (85%) create mode 100644 spring-boot-config-server/local-config/application.yaml create mode 100644 spring-boot-config-server/local-config/bootstrap.yaml create mode 100644 spring-boot-config-server/local-config/config-repo/application.yaml create mode 100644 spring-boot-config-server/local-config/config-repo/default-spring-service.yaml create mode 100644 spring-boot-config-server/local-config/config-repo/default-spring-service2.yaml rename spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/test/java/org/alexmond/simplebootconfigsample/SpringBootThymeleafLayoutSampleApplicationTests.java => spring-boot-config-server/local-config/config-repo/spring-boot-admin-server.yaml (100%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-sample/src/test/java/org/alexmond/simplebootconfigsample/SpringBootThymeleafLayoutSampleApplicationTests.java => spring-boot-config-server/local-config/config-repo/spring-boot-gateway.yaml (100%) create mode 100644 spring-boot-config-server/local-config/gateway.yaml create mode 100644 spring-boot-config-server/pom.xml create mode 100644 spring-boot-config-server/src/main/java/org/alexmond/sample/cloud/HttpExchangeConfiguration.java create mode 100644 spring-boot-config-server/src/main/java/org/alexmond/sample/cloud/SpringBootConfigServerApplication.java create mode 100644 spring-boot-config-server/src/main/resources/application.yaml delete mode 100644 spring-boot-data-jpa-flyway/.gitattributes delete mode 100644 spring-boot-data-jpa-flyway/.gitignore rename spring-boot-openapi-root/spring-boot-openapi/src/main/java/org/alexmond/{simplebootconfigsample => sample/openapi}/HelloWorldRest.java (85%) rename spring-boot-openapi-root/spring-boot-openapi/src/main/java/org/alexmond/{simplebootconfigsample => sample/openapi}/SpringBootOpenapiApplication.java (87%) rename spring-boot-openapi-root/spring-boot-openapi/src/main/java/org/alexmond/sample/{ => openapi}/auth/controller/UserController.java (94%) rename spring-boot-openapi-root/spring-boot-openapi/src/main/java/org/alexmond/sample/{ => openapi}/auth/model/User.java (95%) rename spring-boot-openapi-root/spring-boot-openapi/src/main/java/org/alexmond/sample/{jpa => openapi}/repository/UserRepository.java (88%) rename spring-boot-openapi-root/spring-boot-openapi/src/test/java/org/alexmond/{simplebootconfigsample => sample/openapi}/SimpleBootRestSampleApplicationTests.java (96%) rename spring-boot-rest-sample/src/main/java/org/alexmond/{simplebootconfigsample => sample/rest}/HelloWorldRest.java (85%) rename spring-boot-rest-sample/src/main/java/org/alexmond/{simplebootconfigsample => sample/rest}/SimpleBootRestSampleApplication.java (87%) rename spring-boot-rest-sample/src/test/java/org/alexmond/{simplebootconfigsample => sample/rest}/SimpleBootRestSampleApplicationTests.java (82%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/java/org/alexmond/{simplebootconfigsample => sample/thymeleaf/layout}/MainController.java (93%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/java/org/alexmond/{simplebootconfigsample => sample/thymeleaf/layout}/SpringBootThymeleafLayoutSampleApplication.java (88%) create mode 100644 spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/test/java/org/alexmond/sample/thymeleaf/layout/SimpleBootRestSampleApplicationTests.java rename spring-boot-thymeleaf/spring-boot-thymeleaf-sample/src/main/java/org/alexmond/{simplebootconfigsample => sample/thymeleaf}/SpringBootThymeleafSampleApplication.java (88%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-sample/src/main/java/org/alexmond/sample/{ => thymeleaf}/auth/controller/FormController.java (96%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-sample/src/main/java/org/alexmond/sample/{ => thymeleaf}/auth/controller/HomeController.java (88%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-sample/src/main/java/org/alexmond/sample/{ => thymeleaf}/auth/controller/ProductController.java (88%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-sample/src/main/java/org/alexmond/sample/{ => thymeleaf}/auth/controller/UserController.java (89%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-sample/src/main/java/org/alexmond/sample/{ => thymeleaf}/auth/model/Address.java (85%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-sample/src/main/java/org/alexmond/sample/{ => thymeleaf}/auth/model/Product.java (91%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-sample/src/main/java/org/alexmond/sample/{ => thymeleaf}/auth/model/User.java (91%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-sample/src/main/java/org/alexmond/sample/{ => thymeleaf}/auth/model/UserRole.java (86%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-sample/src/main/java/org/alexmond/sample/{ => thymeleaf}/auth/service/ProductService.java (95%) rename spring-boot-thymeleaf/spring-boot-thymeleaf-sample/src/main/java/org/alexmond/sample/{ => thymeleaf}/auth/service/UserService.java (90%) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index c284cd5..eece949 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -21,10 +21,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 21 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: - java-version: '21' + java-version: '17' distribution: 'temurin' cache: maven - name: Build with Maven diff --git a/.idea/runConfigurations/SpringBootOpenapiApplication.xml b/.idea/runConfigurations/SpringBootOpenapiApplication.xml index 68ed81f..b83b031 100644 --- a/.idea/runConfigurations/SpringBootOpenapiApplication.xml +++ b/.idea/runConfigurations/SpringBootOpenapiApplication.xml @@ -1,7 +1,7 @@ -