From c5de6ca5881b0c05e733d97859a7b99367de1d3a Mon Sep 17 00:00:00 2001 From: Raja Kolli Date: Fri, 8 Mar 2024 14:34:14 +0000 Subject: [PATCH] polish --- README.md | 3 ++- .../archunit/common/ContainersConfig.java | 2 +- boot-choas-monkey/pom.xml | 2 +- .../com/example/choasmonkey/TestApplication.java | 2 +- .../com/example/restdocs/TestApplication.java | 2 +- .../example/featuretoggle/TestApplication.java | 2 +- .../querydsl/common/ContainersConfig.java | 2 +- .../graphql/common/TestContainersConfig.java | 2 +- .../example/envers/common/ContainersConfig.java | 2 +- jpa/boot-jpa-locks/pom.xml | 3 +-- .../shedlock/config/logging/LoggingAspect.java | 16 +++++++++++----- .../shedlock/web/controllers/JobController.java | 12 ++++-------- 12 files changed, 26 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 9048a9338..ed1c47af3 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ * [spring boot integration experiments](#spring-boot-integration-experiments) + * [Tech Stack](#tech-stack) * [Useful Docker Commands](#useful-docker-commands) * [Useful git Commands](#useful-git-commands) @@ -29,7 +30,7 @@ The following table list all sample codes related to the spring boot integration | [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/spring-boot-graphql-querydsl) | The application, demonstrates the way to connect to database using graph ql and querydsl | 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 | diff --git a/boot-api-archunit-sample/src/test/java/com/example/archunit/common/ContainersConfig.java b/boot-api-archunit-sample/src/test/java/com/example/archunit/common/ContainersConfig.java index 5839cec8e..57875a96c 100644 --- a/boot-api-archunit-sample/src/test/java/com/example/archunit/common/ContainersConfig.java +++ b/boot-api-archunit-sample/src/test/java/com/example/archunit/common/ContainersConfig.java @@ -12,6 +12,6 @@ public class ContainersConfig { @Bean @ServiceConnection PostgreSQLContainer postgreSQLContainer() { - return new PostgreSQLContainer<>(DockerImageName.parse("postgres:16.1-alpine")); + return new PostgreSQLContainer<>(DockerImageName.parse("postgres:16.2-alpine")); } } diff --git a/boot-choas-monkey/pom.xml b/boot-choas-monkey/pom.xml index 3cfd4cfef..c951dae79 100644 --- a/boot-choas-monkey/pom.xml +++ b/boot-choas-monkey/pom.xml @@ -234,7 +234,7 @@ - 1.17.0 + 1.19.2 diff --git a/boot-choas-monkey/src/test/java/com/example/choasmonkey/TestApplication.java b/boot-choas-monkey/src/test/java/com/example/choasmonkey/TestApplication.java index daced7d21..0ae6e7e26 100644 --- a/boot-choas-monkey/src/test/java/com/example/choasmonkey/TestApplication.java +++ b/boot-choas-monkey/src/test/java/com/example/choasmonkey/TestApplication.java @@ -14,7 +14,7 @@ public class TestApplication { @ServiceConnection @RestartScope PostgreSQLContainer postgreSQLContainer() { - return new PostgreSQLContainer<>("postgres:16.1-alpine"); + return new PostgreSQLContainer<>("postgres:16.2-alpine"); } public static void main(String[] 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/TestApplication.java index fc24a91be..9b359197e 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/TestApplication.java @@ -12,7 +12,7 @@ public class TestApplication { @Bean @ServiceConnection PostgreSQLContainer postgreSQLContainer() { - return new PostgreSQLContainer<>("postgres:16.1-alpine"); + return new PostgreSQLContainer<>("postgres:16.2-alpine"); } public static void main(String[] args) { diff --git a/boot-togglz-sample/src/test/java/com/example/featuretoggle/TestApplication.java b/boot-togglz-sample/src/test/java/com/example/featuretoggle/TestApplication.java index 560b9f2f0..036473fef 100644 --- a/boot-togglz-sample/src/test/java/com/example/featuretoggle/TestApplication.java +++ b/boot-togglz-sample/src/test/java/com/example/featuretoggle/TestApplication.java @@ -14,7 +14,7 @@ public class TestApplication { @ServiceConnection @RestartScope MySQLContainer sqlContainer() { - return new MySQLContainer<>("mysql:8.2"); + return new MySQLContainer<>("mysql:8.3"); } public static void main(String[] args) { diff --git a/graphql/boot-graphql-querydsl/src/test/java/com/example/graphql/querydsl/common/ContainersConfig.java b/graphql/boot-graphql-querydsl/src/test/java/com/example/graphql/querydsl/common/ContainersConfig.java index faa5f4ee1..31895f2e2 100644 --- a/graphql/boot-graphql-querydsl/src/test/java/com/example/graphql/querydsl/common/ContainersConfig.java +++ b/graphql/boot-graphql-querydsl/src/test/java/com/example/graphql/querydsl/common/ContainersConfig.java @@ -12,6 +12,6 @@ public class ContainersConfig { @Bean @ServiceConnection PostgreSQLContainer postgreSQLContainer() { - return new PostgreSQLContainer<>(DockerImageName.parse("postgres:16.1-alpine")).withReuse(true); + return new PostgreSQLContainer<>(DockerImageName.parse("postgres:16.2-alpine")).withReuse(true); } } diff --git a/graphql/boot-graphql-webmvc/src/test/java/com/example/graphql/common/TestContainersConfig.java b/graphql/boot-graphql-webmvc/src/test/java/com/example/graphql/common/TestContainersConfig.java index 702f6bb1d..50651b9a8 100644 --- a/graphql/boot-graphql-webmvc/src/test/java/com/example/graphql/common/TestContainersConfig.java +++ b/graphql/boot-graphql-webmvc/src/test/java/com/example/graphql/common/TestContainersConfig.java @@ -6,5 +6,5 @@ public interface TestContainersConfig { @ServiceConnection - PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer<>("postgres:16.1-alpine"); + PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer<>("postgres:16.2-alpine"); } 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 4faafcf31..5d0172313 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:16.1-alpine")); + return new PostgreSQLContainer<>(DockerImageName.parse("postgres:16.2-alpine")); } } diff --git a/jpa/boot-jpa-locks/pom.xml b/jpa/boot-jpa-locks/pom.xml index a51ac9c01..4fe935b1c 100644 --- a/jpa/boot-jpa-locks/pom.xml +++ b/jpa/boot-jpa-locks/pom.xml @@ -147,8 +147,6 @@ org.apache.maven.plugins maven-compiler-plugin - ${java.version} - ${java.version} org.mapstruct @@ -183,6 +181,7 @@ -Amapstruct.verbose=true + ${java.version} diff --git a/scheduler/boot-shedlock-sample/src/main/java/com/learning/shedlock/config/logging/LoggingAspect.java b/scheduler/boot-shedlock-sample/src/main/java/com/learning/shedlock/config/logging/LoggingAspect.java index cd5837ea7..ca3ee04cf 100644 --- a/scheduler/boot-shedlock-sample/src/main/java/com/learning/shedlock/config/logging/LoggingAspect.java +++ b/scheduler/boot-shedlock-sample/src/main/java/com/learning/shedlock/config/logging/LoggingAspect.java @@ -25,15 +25,21 @@ public LoggingAspect(Environment env) { this.env = env; } - @Pointcut("within(@org.springframework.stereotype.Repository *)" - + " || within(@org.springframework.stereotype.Service *)" - + " || within(@org.springframework.web.bind.annotation.RestController *)") + @Pointcut( + """ + within(@org.springframework.stereotype.Repository *)\ + || within(@org.springframework.stereotype.Service *)\ + || within(@org.springframework.web.bind.annotation.RestController *)\ + """) public void springBeanPointcut() { // pointcut definition } - @Pointcut("@within(com.learning.shedlock.config.logging.Loggable) || " - + "@annotation(com.learning.shedlock.config.logging.Loggable)") + @Pointcut( + """ + @within(com.learning.shedlock.config.logging.Loggable) || \ + @annotation(com.learning.shedlock.config.logging.Loggable)\ + """) public void applicationPackagePointcut() { // pointcut definition } diff --git a/scheduler/boot-shedlock-sample/src/main/java/com/learning/shedlock/web/controllers/JobController.java b/scheduler/boot-shedlock-sample/src/main/java/com/learning/shedlock/web/controllers/JobController.java index 43855436d..792a220d3 100644 --- a/scheduler/boot-shedlock-sample/src/main/java/com/learning/shedlock/web/controllers/JobController.java +++ b/scheduler/boot-shedlock-sample/src/main/java/com/learning/shedlock/web/controllers/JobController.java @@ -34,14 +34,10 @@ public class JobController { @GetMapping public PagedResult getAllJobs( - @RequestParam(value = "pageNo", defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) - int pageNo, - @RequestParam(value = "pageSize", defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) - int pageSize, - @RequestParam(value = "sortBy", defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) - String sortBy, - @RequestParam(value = "sortDir", defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) - String sortDir) { + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { FindJobsQuery findJobsQuery = new FindJobsQuery(pageNo, pageSize, sortBy, sortDir); return jobService.findAllJobs(findJobsQuery); }