diff --git a/generators/app/__snapshots__/generator.spec.ts.snap b/generators/app/__snapshots__/generator.spec.ts.snap index ff9ce9173022..510d38c4d6be 100644 --- a/generators/app/__snapshots__/generator.spec.ts.snap +++ b/generators/app/__snapshots__/generator.spec.ts.snap @@ -693,6 +693,7 @@ exports[`generator - app with default config should match snapshot 1`] = ` "r2dbc": { "artifactId": "r2dbc-postgresql", "groupId": "org.postgresql", + "version": "1.0.2.RELEASE", }, }, "prodDatabaseExtraOptions": "", @@ -1263,6 +1264,7 @@ exports[`generator - app with gateway should match snapshot 1`] = ` "r2dbc": { "artifactId": "r2dbc-postgresql", "groupId": "org.postgresql", + "version": "1.0.2.RELEASE", }, }, "prodDatabaseExtraOptions": "", @@ -1778,6 +1780,7 @@ exports[`generator - app with microservice should match snapshot 1`] = ` "r2dbc": { "artifactId": "r2dbc-postgresql", "groupId": "org.postgresql", + "version": "1.0.2.RELEASE", }, }, "prodDatabaseExtraOptions": "", diff --git a/generators/gatling/cleanup.ts b/generators/gatling/cleanup.ts index ad70313f7881..38bad29c4eb1 100644 --- a/generators/gatling/cleanup.ts +++ b/generators/gatling/cleanup.ts @@ -23,7 +23,7 @@ import type GatlingGenerator from './generator.js'; * need to be removed. */ export default function cleanupTask(this: GatlingGenerator, { application }) { - if (this.isJhipsterVersionLessThan('8.1.0')) { + if (this.isJhipsterVersionLessThan('8.1.1')) { if (application.buildToolGradle) { this.removeFile('gradle/gatling.gradle'); } diff --git a/generators/generator-constants.js b/generators/generator-constants.js index bc22ab39ce97..32237dffa4c9 100644 --- a/generators/generator-constants.js +++ b/generators/generator-constants.js @@ -36,12 +36,12 @@ export const javaDependencies = { /** * spring-boot version should match the one managed by https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/JHIPSTER_DEPENDENCIES_VERSION */ - 'spring-boot': '3.2.0', + 'spring-boot': '3.2.1', /* * hibernate version should match the one managed by https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/SPRING_BOOT_VERSION * Required due to hibernate-jpamodelgen annotation processor. */ - hibernate: '6.3.1.Final', + hibernate: '6.4.1.Final', /* * cassandra driver version should match the one managed by https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/SPRING_BOOT_VERSION * Required due to java-driver-mapper-processor annotation processor. diff --git a/generators/server/templates/gradle/profile_dev.gradle.ejs b/generators/server/templates/gradle/profile_dev.gradle.ejs index 330bf4a354f8..996e03b96626 100644 --- a/generators/server/templates/gradle/profile_dev.gradle.ejs +++ b/generators/server/templates/gradle/profile_dev.gradle.ejs @@ -35,6 +35,12 @@ configurations { <%_ if (enableHibernateCache && (cacheProviderEhcache || cacheProviderCaffeine || cacheProviderRedis)) { _%> // TODO drop forced version. Refer to https://github.com/jhipster/generator-jhipster/issues/22579 force "org.hibernate.orm:hibernate-jcache:${hibernateVersion}" +<%_ } _%> +<%_ if (prodDatabaseDriver?.r2dbc?.version) { _%> + force "<%- prodDatabaseDriver.r2dbc.groupId %>:<%- prodDatabaseDriver.r2dbc.artifactId %>:<%- prodDatabaseDriver.r2dbc.version %>" +<%_ } _%> +<%_ if (prodDatabaseDriver?.jdbc?.version) { _%> + force "<%- prodDatabaseDriver.jdbc.groupId %>:<%- prodDatabaseDriver.jdbc.artifactId %>:<%- prodDatabaseDriver.jdbc.version %>" <%_ } _%> } } diff --git a/generators/server/templates/gradle/profile_prod.gradle.ejs b/generators/server/templates/gradle/profile_prod.gradle.ejs index 6a4554e44fc8..2f3ee5b4f634 100644 --- a/generators/server/templates/gradle/profile_prod.gradle.ejs +++ b/generators/server/templates/gradle/profile_prod.gradle.ejs @@ -35,6 +35,12 @@ configurations { <%_ if (enableHibernateCache && (cacheProviderEhcache || cacheProviderCaffeine || cacheProviderRedis)) { _%> // TODO drop forced version. Refer to https://github.com/jhipster/generator-jhipster/issues/22579 force "org.hibernate.orm:hibernate-jcache:${hibernateVersion}" +<%_ } _%> +<%_ if (prodDatabaseDriver?.r2dbc?.version) { _%> + force "<%- prodDatabaseDriver.r2dbc.groupId %>:<%- prodDatabaseDriver.r2dbc.artifactId %>:<%- prodDatabaseDriver.r2dbc.version %>" +<%_ } _%> +<%_ if (prodDatabaseDriver?.jdbc?.version) { _%> + force "<%- prodDatabaseDriver.jdbc.groupId %>:<%- prodDatabaseDriver.jdbc.artifactId %>:<%- prodDatabaseDriver.jdbc.version %>" <%_ } _%> } } diff --git a/generators/server/templates/src/main/java/_package_/config/SecurityJwtConfiguration.java.ejs b/generators/server/templates/src/main/java/_package_/config/SecurityJwtConfiguration.java.ejs index 8dfc656b5681..54886a401f64 100644 --- a/generators/server/templates/src/main/java/_package_/config/SecurityJwtConfiguration.java.ejs +++ b/generators/server/templates/src/main/java/_package_/config/SecurityJwtConfiguration.java.ejs @@ -80,9 +80,11 @@ public class SecurityJwtConfiguration { metersService.trackTokenInvalidSignature(); } else if (e.getMessage().contains("Jwt expired at")) { metersService.trackTokenExpired(); - } else if (e.getMessage().contains("Invalid JWT serialization")) { - metersService.trackTokenMalformed(); - } else if (e.getMessage().contains("Invalid unsecured/JWS/JWE")) { + } else if ( + e.getMessage().contains("Invalid JWT serialization") || + e.getMessage().contains("Malformed token") || + e.getMessage().contains("Invalid unsecured/JWS/JWE") + ) { metersService.trackTokenMalformed(); } throw e; diff --git a/generators/spring-cloud-stream/cleanup.ts b/generators/spring-cloud-stream/cleanup.ts index 051cac788ede..2db5b49af094 100644 --- a/generators/spring-cloud-stream/cleanup.ts +++ b/generators/spring-cloud-stream/cleanup.ts @@ -34,7 +34,7 @@ export default function cleanupKafkaFilesTask(this: KafkaGenerator, { applicatio this.removeFile(`${application.srcTestResources}META-INF/spring.factories`); this.removeFile(`${application.javaPackageTestDir}config/TestContainersSpringContextCustomizerFactory.java`); } - if (this.isJhipsterVersionLessThan('8.1.0')) { + if (this.isJhipsterVersionLessThan('8.1.1')) { if (application.messageBrokerPulsar) { this.removeFile('gradle/pulsar.gradle'); } diff --git a/generators/spring-data-relational/internal/dependencies.ts b/generators/spring-data-relational/internal/dependencies.ts index 421c1fb68ab8..418ff9d0d8f9 100644 --- a/generators/spring-data-relational/internal/dependencies.ts +++ b/generators/spring-data-relational/internal/dependencies.ts @@ -31,7 +31,7 @@ const testcontainerFileForDB = { postgresql: 'PostgreSqlTestContainer.java', }; -type JavaArtifact = { groupId: string; artifactId: string }; +type JavaArtifact = { groupId: string; artifactId: string; version?: string }; export type DatabaseArtifact = { jdbc: JavaArtifact; r2dbc: JavaArtifact }; const databaseArtifactForDB: Record = { @@ -51,7 +51,8 @@ const databaseArtifactForDB: Record = { }, postgresql: { jdbc: { groupId: 'org.postgresql', artifactId: 'postgresql' }, - r2dbc: { groupId: 'org.postgresql', artifactId: 'r2dbc-postgresql' }, + // TODO ignore v1.0.3.RELEASE due to https://github.com/pgjdbc/r2dbc-postgresql/issues/622, revisit for spring-boot 3.2.2 + r2dbc: { groupId: 'org.postgresql', artifactId: 'r2dbc-postgresql', version: '1.0.2.RELEASE' }, }, };