diff --git a/generators/spring-boot/templates/gradle/profile_dev.gradle.ejs b/generators/spring-boot/templates/gradle/profile_dev.gradle.ejs
index c6cffaea7d07..9eb7e98b8a48 100644
--- a/generators/spring-boot/templates/gradle/profile_dev.gradle.ejs
+++ b/generators/spring-boot/templates/gradle/profile_dev.gradle.ejs
@@ -149,7 +149,7 @@ task integrationTest(type: Test) {
events 'FAILED', 'SKIPPED'
exceptionFormat "full"
}
- systemProperty('spring.profiles.active', 'testdev')
+ systemProperty('spring.profiles.active', 'test,testdev')
systemProperty('java.security.egd', 'file:/dev/./urandom')
// uncomment if the tests reports are not generated
// see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484
diff --git a/generators/spring-boot/templates/gradle/profile_prod.gradle.ejs b/generators/spring-boot/templates/gradle/profile_prod.gradle.ejs
index 0f533b7d98a3..7ae853607ce3 100644
--- a/generators/spring-boot/templates/gradle/profile_prod.gradle.ejs
+++ b/generators/spring-boot/templates/gradle/profile_prod.gradle.ejs
@@ -82,7 +82,7 @@ task integrationTest(type: Test) {
events 'FAILED', 'SKIPPED'
exceptionFormat "full"
}
- systemProperty('spring.profiles.active', 'testprod')
+ systemProperty('spring.profiles.active', 'test,testprod')
systemProperty('java.security.egd', 'file:/dev/./urandom')
// uncomment if the tests reports are not generated
// see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484
diff --git a/generators/spring-boot/templates/pom.xml.ejs b/generators/spring-boot/templates/pom.xml.ejs
index c1142e05fa00..93f78869fd1a 100644
--- a/generators/spring-boot/templates/pom.xml.ejs
+++ b/generators/spring-boot/templates/pom.xml.ejs
@@ -611,7 +611,7 @@
dev${profile.tls}<%_ if (databaseMigrationLiquibase) { _%>${profile.no-liquibase}<%_ } _%>
- testdev
+ test,testdev
@@ -626,7 +626,7 @@
prod${profile.api-docs}${profile.tls}${profile.e2e}<%_ if (databaseMigrationLiquibase) { _%>${profile.no-liquibase}<%_ } _%>
- testprod
+ test,testprod