From effb47fba4cb0f133008cd9ce02e5f9f893d824f Mon Sep 17 00:00:00 2001 From: Ganesh Tiwari Date: Sat, 3 Feb 2024 19:13:13 -0600 Subject: [PATCH] upgrade to spring boot 3.2.2 (#16) * upgrade to spring boot 3.2.2 --- .../src/main/java/gt/app/domain/Comment.java | 3 -- .../modules/article/CommentRepository.java | 2 +- .../src/test/resources/application.yml | 2 +- pom.xml | 48 +++++++++---------- .../main/resources/application-default.yml | 3 -- .../src/main/resources/application-dev.yml | 6 --- .../src/main/resources/application.yml | 11 ----- .../src/main/resources/application.yml | 2 +- 8 files changed, 27 insertions(+), 50 deletions(-) delete mode 100644 trend/trend-service-api/src/main/resources/application-default.yml delete mode 100644 trend/trend-service-api/src/main/resources/application-dev.yml delete mode 100644 trend/trend-service-api/src/main/resources/application.yml diff --git a/main-app/main-orm/src/main/java/gt/app/domain/Comment.java b/main-app/main-orm/src/main/java/gt/app/domain/Comment.java index 1c3c49b..8d93e9a 100644 --- a/main-app/main-orm/src/main/java/gt/app/domain/Comment.java +++ b/main-app/main-orm/src/main/java/gt/app/domain/Comment.java @@ -3,7 +3,6 @@ import jakarta.persistence.Entity; import jakarta.persistence.EnumType; import jakarta.persistence.Enumerated; -import jakarta.persistence.JoinColumn; import lombok.Data; import java.util.Objects; @@ -16,10 +15,8 @@ public class Comment extends BaseAuditingEntity { @Enumerated(EnumType.STRING) private CommentStatus status = CommentStatus.AWAITING_APPROVAL; - @JoinColumn(nullable = false) private Long articleId; - @JoinColumn(nullable = true) private Long parentCommentId; public Comment() { diff --git a/main-app/main-webapp/src/main/java/gt/app/modules/article/CommentRepository.java b/main-app/main-webapp/src/main/java/gt/app/modules/article/CommentRepository.java index 76a2a07..c6d1d13 100644 --- a/main-app/main-webapp/src/main/java/gt/app/modules/article/CommentRepository.java +++ b/main-app/main-webapp/src/main/java/gt/app/modules/article/CommentRepository.java @@ -31,6 +31,6 @@ public interface CommentRepository extends AbstractRepository, CommentR void deleteByArticleId(Long id); @Override - @CacheEvict(cacheNames = {"articleRead"}, key = "#c.articleId") + @CacheEvict(cacheNames = {"articleRead"}, key = "#result.articleId") Comment save(Comment c); } diff --git a/main-app/main-webapp/src/test/resources/application.yml b/main-app/main-webapp/src/test/resources/application.yml index ad627a9..f06ea4c 100644 --- a/main-app/main-webapp/src/test/resources/application.yml +++ b/main-app/main-webapp/src/test/resources/application.yml @@ -9,7 +9,7 @@ spring: datasource: url: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=MYSQL jpa: - show-sql: false + show-sql: true open-in-view: false hibernate: ddl-auto: none # we use liquibase diff --git a/pom.xml b/pom.xml index bd4666d..60c3e02 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ org.springframework.boot spring-boot-starter-parent - 3.2.1 + 3.2.2 @@ -30,7 +30,7 @@ ${java.version} ${java.version} - 3.2.1 + 3.2.2 2023.0.0 2.21.1 3.6.1 @@ -39,13 +39,13 @@ 2.3.0 1.6.0.Beta1 - 7.0.4 + 7.0.6 33.0.0-jre 1.9.0 1.2.1 3.2.0 - 1.19.3 + 1.19.4 2.15.1 3.6.1 5.0.1 @@ -330,24 +330,24 @@ - - - spring-milestones - Spring Milestones - https://repo.spring.io/milestone - - false - - - - - - spring-milestones - Spring Milestones - https://repo.spring.io/milestone - - false - - - + + + + + + + + + + + + + + + + + + + + diff --git a/trend/trend-service-api/src/main/resources/application-default.yml b/trend/trend-service-api/src/main/resources/application-default.yml deleted file mode 100644 index 0a6f272..0000000 --- a/trend/trend-service-api/src/main/resources/application-default.yml +++ /dev/null @@ -1,3 +0,0 @@ -spring: - profiles: - active: dev diff --git a/trend/trend-service-api/src/main/resources/application-dev.yml b/trend/trend-service-api/src/main/resources/application-dev.yml deleted file mode 100644 index 48d619e..0000000 --- a/trend/trend-service-api/src/main/resources/application-dev.yml +++ /dev/null @@ -1,6 +0,0 @@ -spring: - artemis: - user: ${ACTIVEMQ_ARTEMIS_USER:admin} - password: ${ACTIVEMQ_ARTEMIS_PASSWORD:admin} - broker-url: tcp://${ACTIVEMQ_ARTEMIS_HOST:localhost}:${ACTIVEMQ_ARTEMIS_PORT:61616} - diff --git a/trend/trend-service-api/src/main/resources/application.yml b/trend/trend-service-api/src/main/resources/application.yml deleted file mode 100644 index dbe7906..0000000 --- a/trend/trend-service-api/src/main/resources/application.yml +++ /dev/null @@ -1,11 +0,0 @@ -spring: - application: - name: Trend-Service - profiles: - # The commented value for `active` can be replaced with valid spring profiles to load. - # Otherwise, it will be filled in by maven when building the WAR file - # Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS` - active: '@spring.profiles.active@' - -server: - port: 8083 diff --git a/trend/trend-service/src/main/resources/application.yml b/trend/trend-service/src/main/resources/application.yml index d6f2612..229a716 100644 --- a/trend/trend-service/src/main/resources/application.yml +++ b/trend/trend-service/src/main/resources/application.yml @@ -8,7 +8,7 @@ spring: active: '@spring.profiles.active@' server: - port: 8083 + port: 8084 logging: level: org.springframework.web: INFO