diff --git a/.github/labeler.yml b/.github/labeler.yml index 70bedad96..7606e1a7d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -4,9 +4,9 @@ "component : archunit": - changed-files: - any-glob-to-any-file: 'boot-api-archunit-sample/**/*' -"component : choas-monkey": +"component : chaos-monkey": - changed-files: - - any-glob-to-any-file: 'boot-choas-monkey/**/*' + - any-glob-to-any-file: 'boot-chaos-monkey/**/*' "component : grafana-lgtm": - changed-files: - any-glob-to-any-file: 'boot-grafana-lgtm/**/*' @@ -124,7 +124,7 @@ - any-glob-to-any-file: - batch-boot-jpa-sample/pom.xml - boot-api-archunit-sample/pom.xml - - boot-choas-monkey/pom.xml + - boot-chaos-monkey/pom.xml - boot-mongodb-elasticsearch/pom.xml - boot-opensearch-sample/pom.xml - boot-rabbitmq-thymeleaf/pom.xml diff --git a/.github/workflows/boot-choas-monkey.yml b/.github/workflows/boot-chaos-monkey.yml similarity index 82% rename from .github/workflows/boot-choas-monkey.yml rename to .github/workflows/boot-chaos-monkey.yml index fd18ed316..6f72d051c 100644 --- a/.github/workflows/boot-choas-monkey.yml +++ b/.github/workflows/boot-chaos-monkey.yml @@ -1,13 +1,13 @@ -name: boot-choas-monkey +name: boot-chaos-monkey on: push: paths: - - "boot-choas-monkey/**" + - "boot-chaos-monkey/**" branches: [main] pull_request: paths: - - "boot-choas-monkey/**" + - "boot-chaos-monkey/**" types: - opened - synchronize @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: boot-choas-monkey + working-directory: boot-chaos-monkey steps: - uses: actions/checkout@v4 with: diff --git a/README.md b/README.md index f7e733058..dc808e597 100644 --- a/README.md +++ b/README.md @@ -5,40 +5,40 @@ * [spring boot integration experiments](#spring-boot-integration-experiments) - * [Tech Stack](#tech-stack) - * [Useful Docker Commands](#useful-docker-commands) - * [Useful git Commands](#useful-git-commands) + * [Tech Stack](#tech-stack) + * [Useful Docker Commands](#useful-docker-commands) + * [Useful git Commands](#useful-git-commands) # spring boot integration experiments The following table list all sample codes related to the spring boot integrations. -| Name | Description | Status | -|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------| -| [Ultimate Redis Implementation](./boot-ultimate-redis) | The application, discovers ways of interacting with Redis with different TTLs for different Caches | Completed | -| [Connecting to multiple data sources](./jpa/boot-data-multipledatasources) | The application, demonstrates the way spring boot application connects with multiple databases,connection pooling and both type of database migrations (liquibase and flyway) | Completed | -| [Implementation of Strategy Design Pattern](./boot-strategy-plugin) | The application, demonstrates strategy pattern in spring application and build native image using GraalVM, use a main class to start up the application and builds nativeImage | Completed | -| [Archunit Implementation](./boot-api-archunit-sample) | The application, demonstrates how to apply arch unit rules to the spring boot project | Completed | -| [Hibernate Envers Implementation using spring data JPA](./jpa/boot-data-envers) | The application, demonstrates how to apply hibernate envers to the spring boot project, monitor the system and alert when CPU usage is high or when system is down | Completed | -| [Graph QL implementation using webflux](./graphql/boot-graphql-webflux) | The application, demonstrates the way to connect to database using graph ql using webflux | Completed | -| [Hibernate 2nd Level Cache Using Redis](./jpa/boot-hibernate2ndlevelcache-sample) | The application, demonstrates how to apply Hibernate 2nd level cache using redis in a spring boot project , testing using QueryCounting, implemented hypersistence Repository instead of default JPARepository | Completed | -| [Read Replica Postgres with connection optimization](./jpa/boot-read-replica-postgresql) | The application, demonstrates saving the data in Postgresql and then read from replica instance with optimized connection handling via LazyConnectionDataSourceProxy | Completed | -| [BackgroundJobs and Scheduling using Jobrunr](./scheduler/boot-scheduler-jobrunr) | The application, demonstrates running background jobs and scheduling the tasks using [Jobrunr](https://www.jobrunr.io/en/) | Completed | -| [MultiTenancy DB Based](./jpa/multitenancy/multitenancy-db) | The application, demonstrates running multi tenancy in JPA using different databases but same DDLs and DMLs | Completed | -| [MultiTenancy Partition Based](./jpa/multitenancy/partition) | The application, demonstrates running multi tenancy in JPA using partition based i.e Shared Database with Shared table | Completed | -| [MultiTenancy Schema Based](./jpa/multitenancy/schema) | The application, demonstrates running multi tenancy in JPA using schema based i.e Shared Database with Separate Schema | Completed | -| [MultiTenancy with multipledatsources](./jpa/multitenancy/multidatasource-multitenancy) | The application, demonstrates running multi tenancy in JPA using all strategies using multidatasources | Completed | -| [mongodb-elasticsearch-integration](./boot-mongodb-elasticsearch) | The application, demonstrates saving the data in MongoDb and then searching in ElasticSearch for quick Search, GeoSpatial Search | WIP | -| [spring-boot-graphql-querydsl](./graphql/boot-graphql-querydsl) | The application, demonstrates the way to connect to database using graph ql and querydsl | WIP | -| [spring-boot-graphql-webmvc](./graphql/boot-graphql-webmvc) | The application, demonstrates how to apply graphql concepts to the spring boot project | WIP | -| [Choas Engineering Principles](./boot-choas-monkey) | The application, demonstrates how to apply choas engineering concepts to the spring boot project, test using Gatling to demonstrate the difference | WIP | -| [Feature Toggles](./boot-togglz-sample) | The application, demonstrates how to apply feature toggles concepts to the spring boot project | WIP | -| [Rabbit Mq Implementation](./boot-rabbitmq-thymeleaf) | The application, demonstrates how rabbitmq works with producer side acknowledgement | Completed | -| [Spring Batch Implementation](./batch-boot-jpa-sample) | The application, demonstrates implementing Spring Batch 5 using simple config and creating batch tables using liquibase | Completed | -| [Rest API Documentation with examples](./boot-rest-docs-sample) | This application, demonstrates ability to generate pdf API documentation using spring rest docs | Completed | +| Name | Description | Status | +|-------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------| +| [Spring Batch Implementation](./batch-boot-jpa-sample) | The application, demonstrates implementing Spring Batch 5 using simple config and creating batch tables using liquibase | Completed | +| [Archunit Implementation](./boot-api-archunit-sample) | The application, demonstrates how to apply arch unit rules to the spring boot project | Completed | +| [Chaos Engineering Principles](./boot-chaos-monkey) | The application, demonstrates how to apply chaos engineering concepts to the spring boot project, test using Gatling to demonstrate the difference | WIP | +| [mongodb-elasticsearch-integration](./boot-mongodb-elasticsearch) | The application, demonstrates saving the data in MongoDb and then searching in ElasticSearch for quick Search, GeoSpatial Search | WIP | +| [Rabbit Mq Implementation](./boot-rabbitmq-thymeleaf) | The application, demonstrates how rabbitmq works with producer side acknowledgement | Completed | +| [Rest API Documentation with examples](./boot-rest-docs-sample) | This application, demonstrates ability to generate pdf API documentation using spring rest docs | Completed | +| [Implementation of Strategy Design Pattern](./boot-strategy-plugin) | The application, demonstrates strategy pattern in spring application and build native image using GraalVM, use a main class to start up the application and builds nativeImage | Completed | +| [Feature Toggles](./boot-togglz-sample) | The application, demonstrates how to apply feature toggles concepts to the spring boot project | WIP | +| [Ultimate Redis Implementation](./boot-ultimate-redis) | The application, discovers ways of interacting with Redis with different TTLs for different Caches | Completed | +| [Connecting to multiple data sources](./jpa/boot-data-multipledatasources) | The application, demonstrates the way spring boot application connects with multiple databases,connection pooling and both type of database migrations (liquibase and flyway) | Completed | +| [Hibernate Envers Implementation using spring data JPA](./jpa/boot-data-envers) | The application, demonstrates how to apply hibernate envers to the spring boot project, monitor the system and alert when CPU usage is high or when system is down | Completed | +| [Graph QL implementation using webflux](./graphql/boot-graphql-webflux) | The application, demonstrates the way to connect to database using graph ql using webflux | Completed | +| [Hibernate 2nd Level Cache Using Redis](./jpa/boot-hibernate2ndlevelcache-sample) | The application, demonstrates how to apply Hibernate 2nd level cache using redis in a spring boot project , testing using QueryCounting, implemented hypersistence Repository instead of default JPARepository | Completed | +| [Read Replica Postgres with connection optimization](./jpa/boot-read-replica-postgresql) | The application, demonstrates saving the data in Postgresql and then read from replica instance with optimized connection handling via LazyConnectionDataSourceProxy | Completed | +| [BackgroundJobs and Scheduling using Jobrunr](./scheduler/boot-scheduler-jobrunr) | The application, demonstrates running background jobs and scheduling the tasks using [Jobrunr](https://www.jobrunr.io/en/) | Completed | +| [MultiTenancy DB Based](./jpa/multitenancy/multitenancy-db) | The application, demonstrates running multi tenancy in JPA using different databases but same DDLs and DMLs | Completed | +| [MultiTenancy Partition Based](./jpa/multitenancy/partition) | The application, demonstrates running multi tenancy in JPA using partition based i.e Shared Database with Shared table | Completed | +| [MultiTenancy Schema Based](./jpa/multitenancy/schema) | The application, demonstrates running multi tenancy in JPA using schema based i.e Shared Database with Separate Schema | Completed | +| [MultiTenancy with multipledatsources](./jpa/multitenancy/multidatasource-multitenancy) | The application, demonstrates running multi tenancy in JPA using all strategies using multidatasources | Completed | +| [spring-boot-graphql-querydsl](./graphql/boot-graphql-querydsl) | The application, demonstrates the way to connect to database using graph ql and querydsl | WIP | +| [spring-boot-graphql-webmvc](./graphql/boot-graphql-webmvc) | The application, demonstrates how to apply graphql concepts to the spring boot project | WIP | | [Custom SequenceNumber and LazyConnectionDataSourceProxy for db connection improvement](./jpa/boot-data-customsequence) | This application demonstrates: Custom sequence generation, Database connection optimization using datasource-proxy and LazyConnectionDataSourceProxy with MariaDB, SQL query validation using SQLStatementCountValidator, Dynamic validation using ValidationGroups | Completed | -| [KeySet pagination and dynamic search](./jpa/keyset-pagination/blaze-persistence) | Implements KeySet Pagination using Blaze Persistence and enable dynamic search using specifications | Completed | +| [KeySet pagination and dynamic search](./jpa/keyset-pagination/blaze-persistence) | Implements KeySet Pagination using Blaze Persistence and enable dynamic search using specifications | Completed | For More info about this repository, Please visit [here](https://rajadilipkolli.github.io/my-spring-boot-experiments/) diff --git a/SUMMARY.md b/SUMMARY.md index f969f07da..f3dd2675d 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -3,7 +3,7 @@ * [README](README.md) * [Spring Batch implementation](batch-boot-jpa-sample/README.md) * [API Example for Archunit](boot-api-archunit-sample/README.md) -* [spring-boot-choas-monkey](boot-choas-monkey/README.md) +* [spring-boot-chaos-monkey](boot-chaos-monkey/README.md) * [Grafana LGTM Implementation](boot-grafana-lgtm/ReadMe.md) * [MongoDb for insertion and search using elastic search](boot-mongodb-elasticsearch/README.md) * [OpenSearch Implementation](boot-opensearch-sample/README.md) diff --git a/boot-choas-monkey/.github/workflows/maven.yml b/boot-chaos-monkey/.github/workflows/maven.yml similarity index 100% rename from boot-choas-monkey/.github/workflows/maven.yml rename to boot-chaos-monkey/.github/workflows/maven.yml diff --git a/boot-choas-monkey/.gitignore b/boot-chaos-monkey/.gitignore similarity index 100% rename from boot-choas-monkey/.gitignore rename to boot-chaos-monkey/.gitignore diff --git a/boot-choas-monkey/.mvn/wrapper/maven-wrapper.jar b/boot-chaos-monkey/.mvn/wrapper/maven-wrapper.jar similarity index 100% rename from boot-choas-monkey/.mvn/wrapper/maven-wrapper.jar rename to boot-chaos-monkey/.mvn/wrapper/maven-wrapper.jar diff --git a/boot-choas-monkey/.mvn/wrapper/maven-wrapper.properties b/boot-chaos-monkey/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from boot-choas-monkey/.mvn/wrapper/maven-wrapper.properties rename to boot-chaos-monkey/.mvn/wrapper/maven-wrapper.properties diff --git a/boot-choas-monkey/.yo-rc.json b/boot-chaos-monkey/.yo-rc.json similarity index 100% rename from boot-choas-monkey/.yo-rc.json rename to boot-chaos-monkey/.yo-rc.json diff --git a/boot-choas-monkey/Dockerfile b/boot-chaos-monkey/Dockerfile similarity index 100% rename from boot-choas-monkey/Dockerfile rename to boot-chaos-monkey/Dockerfile diff --git a/boot-choas-monkey/Jenkinsfile b/boot-chaos-monkey/Jenkinsfile similarity index 100% rename from boot-choas-monkey/Jenkinsfile rename to boot-chaos-monkey/Jenkinsfile diff --git a/boot-choas-monkey/README.md b/boot-chaos-monkey/README.md similarity index 99% rename from boot-choas-monkey/README.md rename to boot-chaos-monkey/README.md index 52f6837dc..325444c87 100644 --- a/boot-choas-monkey/README.md +++ b/boot-chaos-monkey/README.md @@ -1,4 +1,4 @@ -# spring-boot-choas-monkey +# spring-boot-chaos-monkey [Choas Monkey](https://netflix.github.io/chaosmonkey/) diff --git a/boot-choas-monkey/docker/docker-compose-app.yml b/boot-chaos-monkey/docker/docker-compose-app.yml similarity index 100% rename from boot-choas-monkey/docker/docker-compose-app.yml rename to boot-chaos-monkey/docker/docker-compose-app.yml diff --git a/boot-choas-monkey/docker/docker-compose.yml b/boot-chaos-monkey/docker/docker-compose.yml similarity index 100% rename from boot-choas-monkey/docker/docker-compose.yml rename to boot-chaos-monkey/docker/docker-compose.yml diff --git a/boot-choas-monkey/lombok.config b/boot-chaos-monkey/lombok.config similarity index 100% rename from boot-choas-monkey/lombok.config rename to boot-chaos-monkey/lombok.config diff --git a/boot-choas-monkey/mvnw b/boot-chaos-monkey/mvnw similarity index 100% rename from boot-choas-monkey/mvnw rename to boot-chaos-monkey/mvnw diff --git a/boot-choas-monkey/mvnw.cmd b/boot-chaos-monkey/mvnw.cmd similarity index 100% rename from boot-choas-monkey/mvnw.cmd rename to boot-chaos-monkey/mvnw.cmd diff --git a/boot-choas-monkey/pom.xml b/boot-chaos-monkey/pom.xml similarity index 98% rename from boot-choas-monkey/pom.xml rename to boot-chaos-monkey/pom.xml index 33b347729..74c7dd05d 100644 --- a/boot-choas-monkey/pom.xml +++ b/boot-chaos-monkey/pom.xml @@ -8,11 +8,11 @@ 3.4.1 - com.example.choasmonkey - boot-choas-monkey + com.example.chaosmonkey + boot-chaos-monkey 0.0.1-SNAPSHOT - boot-choas-monkey - Choas Engineering Principles implementation using spring boot + boot-chaos-monkey + chaos Engineering Principles implementation using spring boot UTF-8 @@ -229,7 +229,7 @@ - 1.22.0 + 1.25.2 diff --git a/boot-choas-monkey/sonar-project.properties b/boot-chaos-monkey/sonar-project.properties similarity index 100% rename from boot-choas-monkey/sonar-project.properties rename to boot-chaos-monkey/sonar-project.properties diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/Application.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/ChaosMonkeyApplication.java similarity index 80% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/Application.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/ChaosMonkeyApplication.java index 52f2838c7..fb395ebc4 100644 --- a/boot-choas-monkey/src/main/java/com/example/choasmonkey/Application.java +++ b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/ChaosMonkeyApplication.java @@ -7,9 +7,9 @@ @SpringBootApplication @EnableConfigurationProperties({ApplicationProperties.class}) -public class Application { +public class ChaosMonkeyApplication { public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(ChaosMonkeyApplication.class, args); } } diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/config/ApplicationProperties.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/config/ApplicationProperties.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/config/ApplicationProperties.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/config/ApplicationProperties.java diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/config/Initializer.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/config/Initializer.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/config/Initializer.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/config/Initializer.java diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/config/SwaggerConfig.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/config/SwaggerConfig.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/config/SwaggerConfig.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/config/SwaggerConfig.java diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/config/WebMvcConfig.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/config/WebMvcConfig.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/config/WebMvcConfig.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/config/WebMvcConfig.java diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/config/logging/Loggable.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/config/logging/Loggable.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/config/logging/Loggable.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/config/logging/Loggable.java diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/config/logging/LoggingAspect.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/config/logging/LoggingAspect.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/config/logging/LoggingAspect.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/config/logging/LoggingAspect.java diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/entities/Customer.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/entities/Customer.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/entities/Customer.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/entities/Customer.java diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/exception/GlobalExceptionHandler.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/exception/GlobalExceptionHandler.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/exception/GlobalExceptionHandler.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/exception/GlobalExceptionHandler.java diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/model/response/CustomerResponse.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/model/response/CustomerResponse.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/model/response/CustomerResponse.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/model/response/CustomerResponse.java diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/repositories/CustomerRepository.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/repositories/CustomerRepository.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/repositories/CustomerRepository.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/repositories/CustomerRepository.java diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/services/CustomerService.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/services/CustomerService.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/services/CustomerService.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/services/CustomerService.java diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/utils/AppConstants.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/utils/AppConstants.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/utils/AppConstants.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/utils/AppConstants.java diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/web/controllers/CustomerController.java b/boot-chaos-monkey/src/main/java/com/example/choasmonkey/web/controllers/CustomerController.java similarity index 100% rename from boot-choas-monkey/src/main/java/com/example/choasmonkey/web/controllers/CustomerController.java rename to boot-chaos-monkey/src/main/java/com/example/choasmonkey/web/controllers/CustomerController.java diff --git a/boot-choas-monkey/src/main/resources/application-local.properties b/boot-chaos-monkey/src/main/resources/application-local.properties similarity index 100% rename from boot-choas-monkey/src/main/resources/application-local.properties rename to boot-chaos-monkey/src/main/resources/application-local.properties diff --git a/boot-choas-monkey/src/main/resources/application.properties b/boot-chaos-monkey/src/main/resources/application.properties similarity index 100% rename from boot-choas-monkey/src/main/resources/application.properties rename to boot-chaos-monkey/src/main/resources/application.properties diff --git a/boot-choas-monkey/src/main/resources/db/changelog/db.changelog-master.yaml b/boot-chaos-monkey/src/main/resources/db/changelog/db.changelog-master.yaml similarity index 100% rename from boot-choas-monkey/src/main/resources/db/changelog/db.changelog-master.yaml rename to boot-chaos-monkey/src/main/resources/db/changelog/db.changelog-master.yaml diff --git a/boot-choas-monkey/src/main/resources/db/changelog/migration/01-init.xml b/boot-chaos-monkey/src/main/resources/db/changelog/migration/01-init.xml similarity index 100% rename from boot-choas-monkey/src/main/resources/db/changelog/migration/01-init.xml rename to boot-chaos-monkey/src/main/resources/db/changelog/migration/01-init.xml diff --git a/boot-choas-monkey/src/main/resources/db/changelog/migration/02-create_customers_table.xml b/boot-chaos-monkey/src/main/resources/db/changelog/migration/02-create_customers_table.xml similarity index 100% rename from boot-choas-monkey/src/main/resources/db/changelog/migration/02-create_customers_table.xml rename to boot-chaos-monkey/src/main/resources/db/changelog/migration/02-create_customers_table.xml diff --git a/boot-choas-monkey/src/main/resources/logback-spring.xml b/boot-chaos-monkey/src/main/resources/logback-spring.xml similarity index 100% rename from boot-choas-monkey/src/main/resources/logback-spring.xml rename to boot-chaos-monkey/src/main/resources/logback-spring.xml diff --git a/boot-choas-monkey/src/test/java/com/example/choasmonkey/ApplicationIntegrationTest.java b/boot-chaos-monkey/src/test/java/com/example/choasmonkey/ApplicationIntegrationTest.java similarity index 100% rename from boot-choas-monkey/src/test/java/com/example/choasmonkey/ApplicationIntegrationTest.java rename to boot-chaos-monkey/src/test/java/com/example/choasmonkey/ApplicationIntegrationTest.java diff --git a/boot-choas-monkey/src/test/java/com/example/choasmonkey/TestApplication.java b/boot-chaos-monkey/src/test/java/com/example/choasmonkey/TestChaosMonkeyApplication.java similarity index 57% rename from boot-choas-monkey/src/test/java/com/example/choasmonkey/TestApplication.java rename to boot-chaos-monkey/src/test/java/com/example/choasmonkey/TestChaosMonkeyApplication.java index 60881eed9..5ebd2474b 100644 --- a/boot-choas-monkey/src/test/java/com/example/choasmonkey/TestApplication.java +++ b/boot-chaos-monkey/src/test/java/com/example/choasmonkey/TestChaosMonkeyApplication.java @@ -3,9 +3,9 @@ import com.example.choasmonkey.common.ContainerConfig; import org.springframework.boot.SpringApplication; -public class TestApplication { +public class TestChaosMonkeyApplication { public static void main(String[] args) { - SpringApplication.from(Application::main).with(ContainerConfig.class).run(args); + SpringApplication.from(ChaosMonkeyApplication::main).with(ContainerConfig.class).run(args); } } diff --git a/boot-choas-monkey/src/test/java/com/example/choasmonkey/common/AbstractIntegrationTest.java b/boot-chaos-monkey/src/test/java/com/example/choasmonkey/common/AbstractIntegrationTest.java similarity index 100% rename from boot-choas-monkey/src/test/java/com/example/choasmonkey/common/AbstractIntegrationTest.java rename to boot-chaos-monkey/src/test/java/com/example/choasmonkey/common/AbstractIntegrationTest.java diff --git a/boot-choas-monkey/src/test/java/com/example/choasmonkey/common/ContainerConfig.java b/boot-chaos-monkey/src/test/java/com/example/choasmonkey/common/ContainerConfig.java similarity index 100% rename from boot-choas-monkey/src/test/java/com/example/choasmonkey/common/ContainerConfig.java rename to boot-chaos-monkey/src/test/java/com/example/choasmonkey/common/ContainerConfig.java diff --git a/boot-choas-monkey/src/test/java/com/example/choasmonkey/gatling/CustomerRequestSimulation.java b/boot-chaos-monkey/src/test/java/com/example/choasmonkey/gatling/CustomerRequestSimulation.java similarity index 100% rename from boot-choas-monkey/src/test/java/com/example/choasmonkey/gatling/CustomerRequestSimulation.java rename to boot-chaos-monkey/src/test/java/com/example/choasmonkey/gatling/CustomerRequestSimulation.java diff --git a/boot-choas-monkey/src/test/java/com/example/choasmonkey/web/controllers/CustomerControllerIT.java b/boot-chaos-monkey/src/test/java/com/example/choasmonkey/web/controllers/CustomerControllerIT.java similarity index 100% rename from boot-choas-monkey/src/test/java/com/example/choasmonkey/web/controllers/CustomerControllerIT.java rename to boot-chaos-monkey/src/test/java/com/example/choasmonkey/web/controllers/CustomerControllerIT.java diff --git a/boot-choas-monkey/src/test/java/com/example/choasmonkey/web/controllers/CustomerControllerTest.java b/boot-chaos-monkey/src/test/java/com/example/choasmonkey/web/controllers/CustomerControllerTest.java similarity index 100% rename from boot-choas-monkey/src/test/java/com/example/choasmonkey/web/controllers/CustomerControllerTest.java rename to boot-chaos-monkey/src/test/java/com/example/choasmonkey/web/controllers/CustomerControllerTest.java diff --git a/boot-choas-monkey/src/test/resources/application-test.properties b/boot-chaos-monkey/src/test/resources/application-test.properties similarity index 100% rename from boot-choas-monkey/src/test/resources/application-test.properties rename to boot-chaos-monkey/src/test/resources/application-test.properties diff --git a/boot-choas-monkey/src/test/resources/logback-test.xml b/boot-chaos-monkey/src/test/resources/logback-test.xml similarity index 100% rename from boot-choas-monkey/src/test/resources/logback-test.xml rename to boot-chaos-monkey/src/test/resources/logback-test.xml diff --git a/boot-grafana-lgtm/pom.xml b/boot-grafana-lgtm/pom.xml index 7226c9619..2e4398549 100644 --- a/boot-grafana-lgtm/pom.xml +++ b/boot-grafana-lgtm/pom.xml @@ -61,7 +61,6 @@ junit-jupiter test - org.testcontainers grafana diff --git a/boot-rabbitmq-thymeleaf/pom.xml b/boot-rabbitmq-thymeleaf/pom.xml index 69a7a6fd9..75d6d57da 100644 --- a/boot-rabbitmq-thymeleaf/pom.xml +++ b/boot-rabbitmq-thymeleaf/pom.xml @@ -262,7 +262,7 @@ - 1.22.0 + 1.25.2 diff --git a/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/RabbitMQIntegrationTest.java b/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/RabbitMQIntegrationTest.java index 67e43ed43..423825da7 100644 --- a/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/RabbitMQIntegrationTest.java +++ b/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/RabbitMQIntegrationTest.java @@ -7,6 +7,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.testcontainers.shaded.org.awaitility.Awaitility.await; +import com.poc.boot.rabbitmq.common.ContainerConfiguration; import com.poc.boot.rabbitmq.model.Order; import com.poc.boot.rabbitmq.repository.TrackingStateRepository; import java.util.concurrent.TimeUnit; @@ -20,7 +21,7 @@ @SpringBootTest( webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, - classes = TestRabbitMQApplication.class) + classes = ContainerConfiguration.class) @AutoConfigureMockMvc class RabbitMQIntegrationTest { diff --git a/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/TestRabbitMQApplication.java b/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/TestRabbitMQApplication.java index 852383786..259dad675 100644 --- a/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/TestRabbitMQApplication.java +++ b/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/TestRabbitMQApplication.java @@ -1,24 +1,11 @@ package com.poc.boot.rabbitmq; +import com.poc.boot.rabbitmq.common.ContainerConfiguration; import org.springframework.boot.SpringApplication; -import org.springframework.boot.devtools.restart.RestartScope; -import org.springframework.boot.test.context.TestConfiguration; -import org.springframework.boot.testcontainers.service.connection.ServiceConnection; -import org.springframework.context.annotation.Bean; -import org.testcontainers.containers.RabbitMQContainer; -import org.testcontainers.utility.DockerImageName; -@TestConfiguration(proxyBeanMethods = false) public class TestRabbitMQApplication { - @Bean - @ServiceConnection - @RestartScope - RabbitMQContainer rabbitMQContainer() { - return new RabbitMQContainer(DockerImageName.parse("rabbitmq").withTag("4.0.4-management")); - } - public static void main(String[] args) { - SpringApplication.from(RabbitMQApplication::main).with(TestRabbitMQApplication.class).run(); + SpringApplication.from(RabbitMQApplication::main).with(ContainerConfiguration.class).run(); } } diff --git a/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/common/ContainerConfiguration.java b/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/common/ContainerConfiguration.java new file mode 100644 index 000000000..fd8f3bbac --- /dev/null +++ b/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/common/ContainerConfiguration.java @@ -0,0 +1,19 @@ +package com.poc.boot.rabbitmq.common; + +import org.springframework.boot.devtools.restart.RestartScope; +import org.springframework.boot.test.context.TestConfiguration; +import org.springframework.boot.testcontainers.service.connection.ServiceConnection; +import org.springframework.context.annotation.Bean; +import org.testcontainers.containers.RabbitMQContainer; +import org.testcontainers.utility.DockerImageName; + +@TestConfiguration(proxyBeanMethods = false) +public class ContainerConfiguration { + + @Bean + @ServiceConnection + @RestartScope + RabbitMQContainer rabbitMQContainer() { + return new RabbitMQContainer(DockerImageName.parse("rabbitmq").withTag("4.0.5-management")); + } +} diff --git a/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/controller/MessageControllerTest.java b/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/controller/MessageControllerTest.java index 8efc1ec05..72148e8da 100644 --- a/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/controller/MessageControllerTest.java +++ b/boot-rabbitmq-thymeleaf/src/test/java/com/poc/boot/rabbitmq/controller/MessageControllerTest.java @@ -19,8 +19,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.MediaType; +import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.test.web.servlet.MockMvc; @WebMvcTest(MessageController.class) @@ -29,7 +29,7 @@ class MessageControllerTest { @Autowired private MockMvc mockMvc; - @MockBean private OrderMessageSender orderMessageSender; + @MockitoBean private OrderMessageSender orderMessageSender; @Test void handleMessage() throws Exception { diff --git a/boot-rest-docs-sample/pom.xml b/boot-rest-docs-sample/pom.xml index ebe4a81c8..54a7a56c5 100644 --- a/boot-rest-docs-sample/pom.xml +++ b/boot-rest-docs-sample/pom.xml @@ -268,7 +268,7 @@ - 1.22.0 + 1.25.2 diff --git a/boot-rest-docs-sample/src/main/java/com/example/restdocs/Application.java b/boot-rest-docs-sample/src/main/java/com/example/restdocs/RestDocsApplication.java similarity index 81% rename from boot-rest-docs-sample/src/main/java/com/example/restdocs/Application.java rename to boot-rest-docs-sample/src/main/java/com/example/restdocs/RestDocsApplication.java index 812d5d4a7..d73b6270b 100644 --- a/boot-rest-docs-sample/src/main/java/com/example/restdocs/Application.java +++ b/boot-rest-docs-sample/src/main/java/com/example/restdocs/RestDocsApplication.java @@ -7,9 +7,9 @@ @SpringBootApplication @EnableConfigurationProperties({ApplicationProperties.class}) -public class Application { +public class RestDocsApplication { public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(RestDocsApplication.class, args); } } diff --git a/boot-rest-docs-sample/src/test/java/com/example/restdocs/TestApplication.java b/boot-rest-docs-sample/src/test/java/com/example/restdocs/TestRestDocsApplication.java similarity index 58% rename from boot-rest-docs-sample/src/test/java/com/example/restdocs/TestApplication.java rename to boot-rest-docs-sample/src/test/java/com/example/restdocs/TestRestDocsApplication.java index 02ff2f7d9..b9a0097fb 100644 --- a/boot-rest-docs-sample/src/test/java/com/example/restdocs/TestApplication.java +++ b/boot-rest-docs-sample/src/test/java/com/example/restdocs/TestRestDocsApplication.java @@ -3,9 +3,9 @@ import com.example.restdocs.common.ContainerConfig; import org.springframework.boot.SpringApplication; -public class TestApplication { +public class TestRestDocsApplication { public static void main(String[] args) { - SpringApplication.from(Application::main).with(ContainerConfig.class).run(args); + SpringApplication.from(RestDocsApplication::main).with(ContainerConfig.class).run(args); } } diff --git a/graphql/boot-graphql-webflux/pom.xml b/graphql/boot-graphql-webflux/pom.xml index b8a156836..9a12ac515 100644 --- a/graphql/boot-graphql-webflux/pom.xml +++ b/graphql/boot-graphql-webflux/pom.xml @@ -227,7 +227,7 @@ - 2.47.0 + 2.50.0 diff --git a/graphql/boot-graphql-webflux/src/main/java/com/example/graphql/Application.java b/graphql/boot-graphql-webflux/src/main/java/com/example/graphql/GraphQLWebFluxApplication.java similarity index 79% rename from graphql/boot-graphql-webflux/src/main/java/com/example/graphql/Application.java rename to graphql/boot-graphql-webflux/src/main/java/com/example/graphql/GraphQLWebFluxApplication.java index b5a0e67df..931c18155 100644 --- a/graphql/boot-graphql-webflux/src/main/java/com/example/graphql/Application.java +++ b/graphql/boot-graphql-webflux/src/main/java/com/example/graphql/GraphQLWebFluxApplication.java @@ -7,9 +7,9 @@ @SpringBootApplication @EnableConfigurationProperties({ApplicationProperties.class}) -public class Application { +public class GraphQLWebFluxApplication { public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(GraphQLWebFluxApplication.class, args); } } diff --git a/graphql/boot-graphql-webflux/src/test/java/com/example/graphql/TestApplication.java b/graphql/boot-graphql-webflux/src/test/java/com/example/graphql/TestGraphQLWebFluxApplication.java similarity index 50% rename from graphql/boot-graphql-webflux/src/test/java/com/example/graphql/TestApplication.java rename to graphql/boot-graphql-webflux/src/test/java/com/example/graphql/TestGraphQLWebFluxApplication.java index 448c53ca8..d8dad0130 100644 --- a/graphql/boot-graphql-webflux/src/test/java/com/example/graphql/TestApplication.java +++ b/graphql/boot-graphql-webflux/src/test/java/com/example/graphql/TestGraphQLWebFluxApplication.java @@ -3,9 +3,11 @@ import com.example.graphql.common.ContainerConfig; import org.springframework.boot.SpringApplication; -public class TestApplication { +public class TestGraphQLWebFluxApplication { public static void main(String[] args) { - SpringApplication.from(Application::main).with(ContainerConfig.class).run(args); + SpringApplication.from(GraphQLWebFluxApplication::main) + .with(ContainerConfig.class) + .run(args); } } diff --git a/graphql/boot-graphql-webmvc/pom.xml b/graphql/boot-graphql-webmvc/pom.xml index b76c94cb4..3fc9e8af4 100644 --- a/graphql/boot-graphql-webmvc/pom.xml +++ b/graphql/boot-graphql-webmvc/pom.xml @@ -157,6 +157,10 @@ + + org.graalvm.buildtools + native-maven-plugin + org.springframework.boot spring-boot-maven-plugin diff --git a/httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/Application.java b/httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/HttpProxyApplication.java similarity index 81% rename from httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/Application.java rename to httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/HttpProxyApplication.java index 7595806f8..006e3f3e2 100644 --- a/httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/Application.java +++ b/httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/HttpProxyApplication.java @@ -7,9 +7,9 @@ @SpringBootApplication @EnableConfigurationProperties({ApplicationProperties.class}) -public class Application { +public class HttpProxyApplication { public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(HttpProxyApplication.class, args); } } diff --git a/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/TestApplication.java b/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/TestHttpProxyApplication.java similarity index 59% rename from httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/TestApplication.java rename to httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/TestHttpProxyApplication.java index 75164e1a1..10e809fb3 100644 --- a/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/TestApplication.java +++ b/httpClients/boot-http-proxy/src/test/java/com/example/rest/proxy/TestHttpProxyApplication.java @@ -3,9 +3,9 @@ import com.example.rest.proxy.common.ContainersConfig; import org.springframework.boot.SpringApplication; -class TestApplication { +class TestHttpProxyApplication { public static void main(String[] args) { - SpringApplication.from(Application::main).with(ContainersConfig.class).run(args); + SpringApplication.from(HttpProxyApplication::main).with(ContainersConfig.class).run(args); } } diff --git a/httpClients/boot-rest-template/pom.xml b/httpClients/boot-rest-template/pom.xml index 7b6fbc9f7..e704a2206 100644 --- a/httpClients/boot-rest-template/pom.xml +++ b/httpClients/boot-rest-template/pom.xml @@ -220,7 +220,7 @@ - 1.25.0 + 1.25.2 diff --git a/httpClients/boot-rest-template/src/main/java/com/example/rest/template/Application.java b/httpClients/boot-rest-template/src/main/java/com/example/rest/template/RestTemplateApplication.java similarity index 80% rename from httpClients/boot-rest-template/src/main/java/com/example/rest/template/Application.java rename to httpClients/boot-rest-template/src/main/java/com/example/rest/template/RestTemplateApplication.java index af233a2da..da73991f7 100644 --- a/httpClients/boot-rest-template/src/main/java/com/example/rest/template/Application.java +++ b/httpClients/boot-rest-template/src/main/java/com/example/rest/template/RestTemplateApplication.java @@ -7,9 +7,9 @@ @SpringBootApplication @EnableConfigurationProperties({ApplicationProperties.class}) -public class Application { +public class RestTemplateApplication { public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(RestTemplateApplication.class, args); } } diff --git a/httpClients/boot-rest-template/src/test/java/com/example/rest/template/TestApplication.java b/httpClients/boot-rest-template/src/test/java/com/example/rest/template/TestRestTemplateApplication.java similarity index 53% rename from httpClients/boot-rest-template/src/test/java/com/example/rest/template/TestApplication.java rename to httpClients/boot-rest-template/src/test/java/com/example/rest/template/TestRestTemplateApplication.java index 5c25f9a20..3d32bf5a3 100644 --- a/httpClients/boot-rest-template/src/test/java/com/example/rest/template/TestApplication.java +++ b/httpClients/boot-rest-template/src/test/java/com/example/rest/template/TestRestTemplateApplication.java @@ -3,9 +3,11 @@ import com.example.rest.template.common.ContainersConfig; import org.springframework.boot.SpringApplication; -class TestApplication { +class TestRestTemplateApplication { public static void main(String[] args) { - SpringApplication.from(Application::main).with(ContainersConfig.class).run(args); + SpringApplication.from(RestTemplateApplication::main) + .with(ContainersConfig.class) + .run(args); } } diff --git a/jpa/README.md b/jpa/README.md index 1d2dc46ce..4752fd0c1 100644 --- a/jpa/README.md +++ b/jpa/README.md @@ -2,4 +2,17 @@ Java Persistence API (JPA) is a Java application programming interface specification that describes the management of relational data in applications using Java Platform, Standard Edition and Java Platform, Enterprise Edition. It provides an object-relational mapping (ORM) facility for the Java language, allowing developers to interact with databases through the use of Java objects. JPA allows developers to easily persist and query data in a database, providing a simple and standardized approach to data persistence and management. -## All Niche Thing about using JPA +## All Niche Things about using JPA + +| Title | Description | +|----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Custom Sequences](./boot-data-customsequence) |
    Implements CustomSequence Generation like `ORD000001`
    Uses [Custom Repository](https://vladmihalcea.com/basejparepository-hypersistence-utils/) instead of OOTB spring data repository
    Logging SQL Statements using `DataSourceProxy`
    Connections Acquiring Optimization using `LazyConnectionDataSourceProxy`
| +| [Entity Auditing using envers](./boot-data-envers) | | +| | | +| | | +| | | +| | | +| | | +| | | +| | | +| | | diff --git a/jpa/boot-data-envers/src/main/java/com/example/envers/Application.java b/jpa/boot-data-envers/src/main/java/com/example/envers/JpaEnversApplication.java similarity index 80% rename from jpa/boot-data-envers/src/main/java/com/example/envers/Application.java rename to jpa/boot-data-envers/src/main/java/com/example/envers/JpaEnversApplication.java index f61fd2d4b..3c57f53be 100644 --- a/jpa/boot-data-envers/src/main/java/com/example/envers/Application.java +++ b/jpa/boot-data-envers/src/main/java/com/example/envers/JpaEnversApplication.java @@ -7,9 +7,9 @@ @SpringBootApplication @EnableConfigurationProperties({ApplicationProperties.class}) -public class Application { +public class JpaEnversApplication { public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(JpaEnversApplication.class, args); } } diff --git a/jpa/boot-data-envers/src/test/java/com/example/envers/TestApplication.java b/jpa/boot-data-envers/src/test/java/com/example/envers/TestJpaEnversApplication.java similarity index 75% rename from jpa/boot-data-envers/src/test/java/com/example/envers/TestApplication.java rename to jpa/boot-data-envers/src/test/java/com/example/envers/TestJpaEnversApplication.java index fb2d2c5b0..7fda3d363 100644 --- a/jpa/boot-data-envers/src/test/java/com/example/envers/TestApplication.java +++ b/jpa/boot-data-envers/src/test/java/com/example/envers/TestJpaEnversApplication.java @@ -3,10 +3,10 @@ import com.example.envers.common.ContainersConfig; import org.springframework.boot.SpringApplication; -public class TestApplication { +public class TestJpaEnversApplication { public static void main(String[] args) { - SpringApplication.from(Application::main) + SpringApplication.from(JpaEnversApplication::main) .with(ContainersConfig.class) .withAdditionalProfiles("local") .run(args); diff --git a/jpa/boot-data-envers/src/test/java/com/example/envers/common/ContainersConfig.java b/jpa/boot-data-envers/src/test/java/com/example/envers/common/ContainersConfig.java index a1aae902d..6e7d6618a 100644 --- a/jpa/boot-data-envers/src/test/java/com/example/envers/common/ContainersConfig.java +++ b/jpa/boot-data-envers/src/test/java/com/example/envers/common/ContainersConfig.java @@ -12,6 +12,6 @@ public class ContainersConfig { @Bean @ServiceConnection PostgreSQLContainer postgreSQLContainer() { - return new PostgreSQLContainer<>(DockerImageName.parse("postgres:17.2-alpine")); + return new PostgreSQLContainer<>(DockerImageName.parse("postgres").withTag("17.2-alpine")); } } diff --git a/jpa/boot-data-envers/src/test/java/com/example/envers/repository/SchemaValidationTest.java b/jpa/boot-data-envers/src/test/java/com/example/envers/repository/SchemaValidationTest.java index 7fa9408b6..9a7463ab9 100644 --- a/jpa/boot-data-envers/src/test/java/com/example/envers/repository/SchemaValidationTest.java +++ b/jpa/boot-data-envers/src/test/java/com/example/envers/repository/SchemaValidationTest.java @@ -10,7 +10,7 @@ import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; import org.springframework.context.annotation.Import; -@DataJpaTest(properties = {"spring.jpa.hibernate.ddl-auto=validate", "spring.test.database.replace=none"}) +@DataJpaTest(properties = {"spring.jpa.hibernate.ddl-auto=validate"}) @Import(ContainersConfig.class) class SchemaValidationTest { diff --git a/jpa/boot-data-envers/src/test/java/com/example/envers/web/controllers/CustomerControllerTest.java b/jpa/boot-data-envers/src/test/java/com/example/envers/web/controllers/CustomerControllerTest.java index 9e145efaa..35fe9d00c 100644 --- a/jpa/boot-data-envers/src/test/java/com/example/envers/web/controllers/CustomerControllerTest.java +++ b/jpa/boot-data-envers/src/test/java/com/example/envers/web/controllers/CustomerControllerTest.java @@ -33,12 +33,12 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.test.web.servlet.MockMvc; @WebMvcTest(controllers = CustomerController.class) @@ -48,7 +48,7 @@ class CustomerControllerTest { @Autowired private MockMvc mockMvc; - @MockBean + @MockitoBean private CustomerService customerService; @Autowired diff --git a/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/mapper/CustomerMapper.java b/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/mapper/CustomerMapper.java index bae7c2bc7..b0732877d 100644 --- a/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/mapper/CustomerMapper.java +++ b/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/mapper/CustomerMapper.java @@ -20,6 +20,7 @@ suppressTimestampInGenerated = true) public interface CustomerMapper { + @Mapping(target = "id", ignore = true) Customer toEntity(CustomerRequest customerRequest); @IterableMapping(elementTargetType = CustomerResponse.class) diff --git a/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/mapper/OrderMapper.java b/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/mapper/OrderMapper.java index a0f2629a6..57300cb85 100644 --- a/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/mapper/OrderMapper.java +++ b/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/mapper/OrderMapper.java @@ -20,6 +20,7 @@ suppressTimestampInGenerated = true) public interface OrderMapper { + @Mapping(target = "removeOrderItem", ignore = true) @Mapping(target = "orderItems", ignore = true) @Mapping(target = "id", ignore = true) @Mapping(target = "customer.id", source = "customerId") @@ -32,6 +33,7 @@ public interface OrderMapper { @IterableMapping(elementTargetType = OrderResponse.class) List mapToOrderResponseList(List orderList); + @Mapping(target = "removeOrderItem", ignore = true) @Mapping(target = "orderItems", ignore = true) @Mapping(target = "id", ignore = true) @Mapping(target = "customer", ignore = true) diff --git a/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/repositories/CustomerRepository.java b/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/repositories/CustomerRepository.java index c3bd90b84..49d121633 100644 --- a/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/repositories/CustomerRepository.java +++ b/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/repositories/CustomerRepository.java @@ -16,7 +16,6 @@ public interface CustomerRepository extends BaseJpaRepository, PagingAndSortingRepository { - @Transactional(readOnly = true) @QueryHints(@QueryHint(name = HINT_CACHEABLE, value = "true")) @EntityGraph(attributePaths = {"orders"}) Optional findByFirstName(String firstName); diff --git a/jpa/boot-jndi-sample/pom.xml b/jpa/boot-jndi-sample/pom.xml index b25547c07..f33e0a917 100644 --- a/jpa/boot-jndi-sample/pom.xml +++ b/jpa/boot-jndi-sample/pom.xml @@ -210,7 +210,7 @@ - 2.47.0 + 2.50.0 diff --git a/jpa/boot-jndi-sample/src/main/java/com/example/jndi/Application.java b/jpa/boot-jndi-sample/src/main/java/com/example/jndi/JNDIApplication.java similarity index 82% rename from jpa/boot-jndi-sample/src/main/java/com/example/jndi/Application.java rename to jpa/boot-jndi-sample/src/main/java/com/example/jndi/JNDIApplication.java index c0dd4639b..a38df13ba 100644 --- a/jpa/boot-jndi-sample/src/main/java/com/example/jndi/Application.java +++ b/jpa/boot-jndi-sample/src/main/java/com/example/jndi/JNDIApplication.java @@ -7,9 +7,9 @@ @SpringBootApplication @EnableConfigurationProperties({ApplicationProperties.class}) -public class Application { +public class JNDIApplication { public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(JNDIApplication.class, args); } } diff --git a/jpa/boot-jpa-locks/src/main/java/com/example/locks/Application.java b/jpa/boot-jpa-locks/src/main/java/com/example/locks/JpaLocksApplication.java similarity index 81% rename from jpa/boot-jpa-locks/src/main/java/com/example/locks/Application.java rename to jpa/boot-jpa-locks/src/main/java/com/example/locks/JpaLocksApplication.java index faff89ee2..1435502a0 100644 --- a/jpa/boot-jpa-locks/src/main/java/com/example/locks/Application.java +++ b/jpa/boot-jpa-locks/src/main/java/com/example/locks/JpaLocksApplication.java @@ -7,9 +7,9 @@ @SpringBootApplication @EnableConfigurationProperties({ApplicationProperties.class}) -public class Application { +public class JpaLocksApplication { public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(JpaLocksApplication.class, args); } } diff --git a/jpa/boot-jpa-locks/src/test/java/com/example/locks/TestApplication.java b/jpa/boot-jpa-locks/src/test/java/com/example/locks/TestJpaLocksApplication.java similarity index 79% rename from jpa/boot-jpa-locks/src/test/java/com/example/locks/TestApplication.java rename to jpa/boot-jpa-locks/src/test/java/com/example/locks/TestJpaLocksApplication.java index 402de513d..bfc7c0802 100644 --- a/jpa/boot-jpa-locks/src/test/java/com/example/locks/TestApplication.java +++ b/jpa/boot-jpa-locks/src/test/java/com/example/locks/TestJpaLocksApplication.java @@ -4,10 +4,10 @@ import com.example.locks.utils.AppConstants; import org.springframework.boot.SpringApplication; -public class TestApplication { +public class TestJpaLocksApplication { public static void main(String[] args) { - SpringApplication.from(Application::main) + SpringApplication.from(JpaLocksApplication::main) .with(ContainersConfig.class) .withAdditionalProfiles(AppConstants.PROFILE_LOCAL) .run(args); diff --git a/jpa/keyset-pagination/blaze-persistence/pom.xml b/jpa/keyset-pagination/blaze-persistence/pom.xml index 4ab33667a..d804fa5db 100644 --- a/jpa/keyset-pagination/blaze-persistence/pom.xml +++ b/jpa/keyset-pagination/blaze-persistence/pom.xml @@ -14,7 +14,7 @@ boot-data-keyset-pagination-blaze 0.0.1-SNAPSHOT boot-data-keyset-pagination-blaze - boot-data-keyset-pagination + boot-data-keyset-pagination-blaze UTF-8 @@ -229,7 +229,7 @@ - 1.22.0 + 1.25.2 diff --git a/jpa/keyset-pagination/blaze-persistence/src/main/java/com/example/keysetpagination/Application.java b/jpa/keyset-pagination/blaze-persistence/src/main/java/com/example/keysetpagination/BlazePersistenceApplication.java similarity index 79% rename from jpa/keyset-pagination/blaze-persistence/src/main/java/com/example/keysetpagination/Application.java rename to jpa/keyset-pagination/blaze-persistence/src/main/java/com/example/keysetpagination/BlazePersistenceApplication.java index 23c8ecfad..82f561ef5 100644 --- a/jpa/keyset-pagination/blaze-persistence/src/main/java/com/example/keysetpagination/Application.java +++ b/jpa/keyset-pagination/blaze-persistence/src/main/java/com/example/keysetpagination/BlazePersistenceApplication.java @@ -7,9 +7,9 @@ @SpringBootApplication @EnableConfigurationProperties({ApplicationProperties.class}) -public class Application { +public class BlazePersistenceApplication { public static void main(String[] args) { - SpringApplication.run(Application.class, args); + SpringApplication.run(BlazePersistenceApplication.class, args); } } diff --git a/jpa/keyset-pagination/blaze-persistence/src/test/java/com/example/keysetpagination/TestApplication.java b/jpa/keyset-pagination/blaze-persistence/src/test/java/com/example/keysetpagination/TestBlazePersistenceApplication.java similarity index 58% rename from jpa/keyset-pagination/blaze-persistence/src/test/java/com/example/keysetpagination/TestApplication.java rename to jpa/keyset-pagination/blaze-persistence/src/test/java/com/example/keysetpagination/TestBlazePersistenceApplication.java index a77e888b0..72360712d 100644 --- a/jpa/keyset-pagination/blaze-persistence/src/test/java/com/example/keysetpagination/TestApplication.java +++ b/jpa/keyset-pagination/blaze-persistence/src/test/java/com/example/keysetpagination/TestBlazePersistenceApplication.java @@ -3,10 +3,12 @@ import com.example.keysetpagination.common.ContainersConfig; import org.springframework.boot.SpringApplication; -public class TestApplication { +public class TestBlazePersistenceApplication { public static void main(String[] args) { System.setProperty("spring.profiles.active", "local"); - SpringApplication.from(Application::main).with(ContainersConfig.class).run(args); + SpringApplication.from(BlazePersistenceApplication::main) + .with(ContainersConfig.class) + .run(args); } } diff --git a/pom.xml b/pom.xml index 8001481ee..83e24b969 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ batch-boot-jpa-sample boot-api-archunit-sample - boot-choas-monkey + boot-chaos-monkey boot-grafana-lgtm boot-mongodb-elasticsearch boot-opensearch-sample diff --git a/r2dbc/boot-jooq-r2dbc-sample/pom.xml b/r2dbc/boot-jooq-r2dbc-sample/pom.xml index b0a5d9e4f..34f6ca762 100644 --- a/r2dbc/boot-jooq-r2dbc-sample/pom.xml +++ b/r2dbc/boot-jooq-r2dbc-sample/pom.xml @@ -332,7 +332,7 @@ - 1.25.0 + 1.25.2 diff --git a/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/services/ReactiveCommentsService.java b/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/services/ReactiveCommentsService.java index f63defeeb..69aa20447 100644 --- a/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/services/ReactiveCommentsService.java +++ b/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/services/ReactiveCommentsService.java @@ -13,7 +13,7 @@ import reactor.core.publisher.Mono; @Service -@Transactional +@Transactional(readOnly = true) @RequiredArgsConstructor public class ReactiveCommentsService { @@ -34,6 +34,7 @@ public Mono findReactiveCommentById(UUID id) { return reactiveCommentsRepository.findById(id); } + @Transactional public Mono saveReactiveCommentByPostId( ReactiveCommentRequest reactiveCommentRequest) { ReactiveComments reactiveComments = @@ -41,6 +42,7 @@ public Mono saveReactiveCommentByPostId( return reactiveCommentsRepository.save(reactiveComments); } + @Transactional public Mono updateReactivePostComment( ReactiveCommentRequest reactiveCommentRequest, ReactiveComments reactiveComments) { reactivePostCommentMapper.updateReactiveCommentRequestFromReactiveComments( @@ -48,6 +50,7 @@ public Mono updateReactivePostComment( return reactiveCommentsRepository.save(reactiveComments); } + @Transactional public Mono deleteReactiveCommentById(UUID id) { return reactiveCommentsRepository.deleteById(id); } diff --git a/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/services/ReactivePostServiceTest.java b/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/services/ReactivePostServiceTest.java index 429d15310..0370b0512 100644 --- a/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/services/ReactivePostServiceTest.java +++ b/r2dbc/boot-r2dbc-sample/src/test/java/com/example/bootr2dbc/services/ReactivePostServiceTest.java @@ -109,8 +109,9 @@ void deleteReactivePostById() { // given given(reactivePostRepository.deleteById(1L)).willReturn(Mono.empty()); // when - reactivePostService.deleteReactivePostById(1L); + Mono voidMono = reactivePostService.deleteReactivePostById(1L); // then + StepVerifier.create(voidMono).expectComplete().verify(); verify(reactivePostRepository, times(1)).deleteById(1L); } diff --git a/scheduler/boot-scheduler-quartz/src/main/resources/application.properties b/scheduler/boot-scheduler-quartz/src/main/resources/application.properties index 49e523d98..99342af40 100644 --- a/scheduler/boot-scheduler-quartz/src/main/resources/application.properties +++ b/scheduler/boot-scheduler-quartz/src/main/resources/application.properties @@ -39,12 +39,12 @@ spring.quartz.properties.org.quartz.scheduler.instanceId=AUTO spring.quartz.properties.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate ## Default is RamJobStore, if you want to use JDBC Job Store, you need to set the following properties spring.quartz.properties.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX -spring.quartz.properties.org.quartz.jobStore.dataSource=quartzDataSource -spring.quartz.properties.org.quartz.dataSource.quartzDataSource.provider=hikaricp -spring.quartz.properties.org.quartz.dataSource.quartzDataSource.driver=${spring.datasource.driver-class-name} -spring.quartz.properties.org.quartz.dataSource.quartzDataSource.URL=${spring.datasource.url} -spring.quartz.properties.org.quartz.dataSource.quartzDataSource.user=${spring.datasource.username} -spring.quartz.properties.org.quartz.dataSource.quartzDataSource.password=${spring.datasource.password} -spring.quartz.properties.org.quartz.dataSource.quartzDataSource.maxConnections=10 -spring.quartz.properties.org.quartz.dataSource.quartzDataSource.validationQuery=select 1 +spring.quartz.properties.org.quartz.jobStore.dataSource=quartzDS +spring.quartz.properties.org.quartz.dataSource.quartzDS.provider=hikaricp +spring.quartz.properties.org.quartz.dataSource.quartzDS.driver=${spring.datasource.driver-class-name} +spring.quartz.properties.org.quartz.dataSource.quartzDS.URL=${spring.datasource.url} +spring.quartz.properties.org.quartz.dataSource.quartzDS.user=${spring.datasource.username} +spring.quartz.properties.org.quartz.dataSource.quartzDS.password=${spring.datasource.password} +spring.quartz.properties.org.quartz.dataSource.quartzDS.maxConnections=10 +spring.quartz.properties.org.quartz.dataSource.quartzDS.validationQuery=select 1 diff --git a/scheduler/boot-scheduler-quartz/src/test/java/com/scheduler/quartz/common/ContainersConfig.java b/scheduler/boot-scheduler-quartz/src/test/java/com/scheduler/quartz/common/ContainersConfig.java index a9c2c9164..551431648 100644 --- a/scheduler/boot-scheduler-quartz/src/test/java/com/scheduler/quartz/common/ContainersConfig.java +++ b/scheduler/boot-scheduler-quartz/src/test/java/com/scheduler/quartz/common/ContainersConfig.java @@ -20,13 +20,11 @@ PostgreSQLContainer postgreSQLContainer() { DynamicPropertyRegistrar dynamicPropertyRegistrar(PostgreSQLContainer postgreSQLContainer) { return (registrar) -> { registrar.add( - "spring.quartz.properties.org.quartz.dataSource.quartzDataSource.URL", - postgreSQLContainer::getJdbcUrl); + "spring.quartz.properties.org.quartz.dataSource.quartzDS.URL", postgreSQLContainer::getJdbcUrl); registrar.add( - "spring.quartz.properties.org.quartz.dataSource.quartzDataSource.user", - postgreSQLContainer::getUsername); + "spring.quartz.properties.org.quartz.dataSource.quartzDS.user", postgreSQLContainer::getUsername); registrar.add( - "spring.quartz.properties.org.quartz.dataSource.quartzDataSource.password", + "spring.quartz.properties.org.quartz.dataSource.quartzDS.password", postgreSQLContainer::getPassword); }; }