Repository: jhipster/jhipster-lite
Pull request #11017 (2024-09-29 22:02:25)

Group existing postgresl, mysql, mariadb and mssql modules into a 'jpa' module
Preparing the arrival of Jooq, see #9235

Breaking: renamed slugs to add the prefix 'jpa-'


Patch:
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/common/package-info.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/common/package-info.java
deleted file mode 100644
index 84c9474de..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/common/package-info.java
+++ /dev/null
@@ -1,2 +0,0 @@
-@tech.jhipster.lite.SharedKernel
-package tech.jhipster.lite.generator.server.springboot.database.common;
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/application/JpaApplicationService.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/application/JpaApplicationService.java
new file mode 100644
index 000000000..8a9c8601a
--- /dev/null
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/application/JpaApplicationService.java
@@ -0,0 +1,33 @@
+package tech.jhipster.lite.generator.server.springboot.database.jpa.application;
+
+import org.springframework.stereotype.Service;
+import tech.jhipster.lite.generator.server.springboot.database.jpa.domain.JpaModuleFactory;
+import tech.jhipster.lite.module.domain.JHipsterModule;
+import tech.jhipster.lite.module.domain.docker.DockerImages;
+import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
+
+@Service
+public class JpaApplicationService {
+
+  private final JpaModuleFactory factory;
+
+  public JpaApplicationService(DockerImages dockerImages) {
+    factory = new JpaModuleFactory(dockerImages);
+  }
+
+  public JHipsterModule buildPostgresql(JHipsterModuleProperties properties) {
+    return factory.buildPostgresql(properties);
+  }
+
+  public JHipsterModule buildMariaDB(JHipsterModuleProperties properties) {
+    return factory.buildMariaDB(properties);
+  }
+
+  public JHipsterModule buildMsSQL(JHipsterModuleProperties properties) {
+    return factory.buildMsSQL(properties);
+  }
+
+  public JHipsterModule buildMySQL(JHipsterModuleProperties properties) {
+    return factory.buildMySQL(properties);
+  }
+}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/common/domain/DatabaseType.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/domain/DatabaseType.java
similarity index 86%
rename from src/main/java/tech/jhipster/lite/generator/server/springboot/database/common/domain/DatabaseType.java
rename to src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/domain/DatabaseType.java
index 49d39bc32..37ce0b567 100644
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/common/domain/DatabaseType.java
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/domain/DatabaseType.java
@@ -1,6 +1,6 @@
-package tech.jhipster.lite.generator.server.springboot.database.common.domain;
+package tech.jhipster.lite.generator.server.springboot.database.jpa.domain;
 
-public enum DatabaseType {
+enum DatabaseType {
   POSTGRESQL("postgresql"),
   MYSQL("mysql"),
   MARIADB("mariadb"),
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/domain/JpaModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/domain/JpaModuleFactory.java
new file mode 100644
index 000000000..edd00c21f
--- /dev/null
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/domain/JpaModuleFactory.java
@@ -0,0 +1,174 @@
+package tech.jhipster.lite.generator.server.springboot.database.jpa.domain;
+
+import static tech.jhipster.lite.generator.server.springboot.database.jpa.domain.SQLCommonModuleBuilder.sqlCommonModuleBuilder;
+import static tech.jhipster.lite.module.domain.JHipsterModule.artifactId;
+import static tech.jhipster.lite.module.domain.JHipsterModule.documentationTitle;
+import static tech.jhipster.lite.module.domain.JHipsterModule.from;
+import static tech.jhipster.lite.module.domain.JHipsterModule.groupId;
+import static tech.jhipster.lite.module.domain.JHipsterModule.javaDependency;
+import static tech.jhipster.lite.module.domain.JHipsterModule.lineBeforeText;
+import static tech.jhipster.lite.module.domain.JHipsterModule.path;
+import static tech.jhipster.lite.module.domain.JHipsterModule.propertyKey;
+import static tech.jhipster.lite.module.domain.JHipsterModule.propertyValue;
+import static tech.jhipster.lite.module.domain.JHipsterModule.to;
+import static tech.jhipster.lite.module.domain.JHipsterModule.toSrcTestJava;
+
+import tech.jhipster.lite.module.domain.JHipsterModule;
+import tech.jhipster.lite.module.domain.LogLevel;
+import tech.jhipster.lite.module.domain.docker.DockerImageVersion;
+import tech.jhipster.lite.module.domain.docker.DockerImages;
+import tech.jhipster.lite.module.domain.file.JHipsterSource;
+import tech.jhipster.lite.module.domain.javadependency.JavaDependency;
+import tech.jhipster.lite.module.domain.javadependency.JavaDependencyScope;
+import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
+
+public class JpaModuleFactory {
+
+  public static final String ORG_POSTGRESQL = "org.postgresql";
+  private static final String MYSQL = "mysql";
+  private static final String MYSQL_GROUP_ID = "com.mysql";
+  private static final String MYSQL_ARTIFACT_ID = "mysql-connector-j";
+
+  private static final String SPRING_DATASOURCE_URL = "spring.datasource.url";
+  private static final String SPRING_DATASOURCE_USERNAME = "spring.datasource.username";
+  private static final String SPRING_DATASOURCE_DRIVER_CLASS_NAME = "spring.datasource.driver-class-name";
+
+  private final DockerImages dockerImages;
+
+  public JpaModuleFactory(DockerImages dockerImages) {
+    this.dockerImages = dockerImages;
+  }
+
+  public JHipsterModule buildPostgresql(JHipsterModuleProperties properties) {
+    DockerImageVersion dockerImage = dockerImages.get("postgres");
+
+    //@formatter:off
+    return sqlCommonModuleBuilder(
+      properties,
+      DatabaseType.POSTGRESQL,
+      dockerImage,
+      documentationTitle("Postgresql"),
+      artifactId("postgresql")
+    )
+      .javaDependencies()
+        .addDependency(
+          JavaDependency.builder()
+            .groupId(groupId(ORG_POSTGRESQL))
+            .artifactId(artifactId("postgresql"))
+            .scope(JavaDependencyScope.RUNTIME)
+            .build()
+        )
+        .and()
+      .springMainProperties()
+        .set(propertyKey(SPRING_DATASOURCE_URL), propertyValue("jdbc:postgresql://localhost:5432/" + properties.projectBaseName().name()))
+        .set(propertyKey(SPRING_DATASOURCE_USERNAME), propertyValue(properties.projectBaseName().name()))
+        .set(propertyKey(SPRING_DATASOURCE_DRIVER_CLASS_NAME), propertyValue("org.postgresql.Driver"))
+        .and()
+      .springTestProperties()
+        .set(
+          propertyKey(SPRING_DATASOURCE_URL),
+          propertyValue(
+            "jdbc:tc:postgresql:" + dockerImage.version().get() + ":///" + properties.projectBaseName().name() + "?TC_TMPFS=/testtmpfs:rw"
+          )
+        )
+        .and()
+      .springMainLogger(ORG_POSTGRESQL, LogLevel.WARN)
+      .springTestLogger(ORG_POSTGRESQL, LogLevel.WARN)
+      .springTestLogger("org.jboss.logging", LogLevel.WARN)
+      .build();
+    //@formatter:on
+  }
+
+  public JHipsterModule buildMariaDB(JHipsterModuleProperties properties) {
+    //@formatter:off
+    return sqlCommonModuleBuilder(
+      properties,
+      DatabaseType.MARIADB,
+      dockerImages.get("mariadb"),
+      documentationTitle("MariaDB"),
+      artifactId("mariadb")
+    )
+      .javaDependencies()
+        .addDependency(
+          javaDependency().groupId("org.mariadb.jdbc").artifactId("mariadb-java-client").scope(JavaDependencyScope.RUNTIME).build()
+        )
+        .and()
+      .springMainProperties()
+        .set(propertyKey(SPRING_DATASOURCE_URL), propertyValue("jdbc:mariadb://localhost:3306/" + properties.projectBaseName().name()))
+        .set(propertyKey(SPRING_DATASOURCE_USERNAME), propertyValue("root"))
+        .set(propertyKey(SPRING_DATASOURCE_DRIVER_CLASS_NAME), propertyValue("org.mariadb.jdbc.Driver"))
+        .and()
+      .build();
+    //@formatter:on
+  }
+
+  public JHipsterModule buildMySQL(JHipsterModuleProperties properties) {
+    //@formatter:off
+    return sqlCommonModuleBuilder(properties, DatabaseType.MYSQL, dockerImages.get(MYSQL), documentationTitle("MySQL"), artifactId(MYSQL))
+      .javaDependencies()
+        .addDependency(javaDependency().groupId(MYSQL_GROUP_ID).artifactId(MYSQL_ARTIFACT_ID).scope(JavaDependencyScope.RUNTIME).build())
+        .and()
+      .springMainProperties()
+        .set(propertyKey(SPRING_DATASOURCE_URL), propertyValue("jdbc:mysql://localhost:3306/" + properties.projectBaseName().name()))
+        .set(propertyKey(SPRING_DATASOURCE_USERNAME), propertyValue("root"))
+        .set(propertyKey(SPRING_DATASOURCE_DRIVER_CLASS_NAME), propertyValue("com.mysql.cj.jdbc.Driver"))
+        .and()
+      .build();
+    //@formatter:on
+  }
+
+  public JHipsterModule buildMsSQL(JHipsterModuleProperties properties) {
+    DockerImageVersion dockerImage = dockerImages.get("mcr.microsoft.com/mssql/server");
+    JHipsterSource source = from("server/springboot/database/jpa");
+
+    //@formatter:off
+    return sqlCommonModuleBuilder(properties, DatabaseType.MSSQL, dockerImage, documentationTitle("MsSQL"), artifactId("mssqlserver"))
+      .files()
+        .add(source.append("docker").template("container-license-acceptance.txt"), to("src/test/resources/container-license-acceptance.txt"))
+        .add(
+          source.template("MsSQLTestContainerExtension.java"),
+          toSrcTestJava().append(properties.basePackage().path()).append("MsSQLTestContainerExtension.java")
+        )
+        .and()
+      .javaDependencies()
+        .addDependency(javaDependency().groupId("com.microsoft.sqlserver").artifactId("mssql-jdbc").scope(JavaDependencyScope.RUNTIME).build())
+        .and()
+      .springMainProperties()
+        .set(
+          propertyKey(SPRING_DATASOURCE_URL),
+          propertyValue("jdbc:sqlserver://localhost:1433;database=" + properties.projectBaseName().name() + ";trustServerCertificate=true")
+        )
+        .set(propertyKey(SPRING_DATASOURCE_USERNAME), propertyValue("SA"))
+        .set(propertyKey("spring.datasource.password"), propertyValue("yourStrong(!)Password"))
+        .set(propertyKey(SPRING_DATASOURCE_DRIVER_CLASS_NAME), propertyValue("com.microsoft.sqlserver.jdbc.SQLServerDriver"))
+        .set(propertyKey("spring.jpa.hibernate.ddl-auto"), propertyValue("update"))
+        .set(propertyKey("spring.jpa.properties.hibernate.criteria.literal_handling_mode"), propertyValue("BIND"))
+        .set(propertyKey("spring.jpa.properties.hibernate.dialect"), propertyValue("org.hibernate.dialect.SQLServer2012Dialect"))
+        .set(propertyKey("spring.jpa.properties.hibernate.format_sql"), propertyValue(true))
+        .set(propertyKey("spring.jpa.properties.hibernate.jdbc.fetch_size"), propertyValue(150))
+        .and()
+      .springTestProperties()
+        .set(
+          propertyKey(SPRING_DATASOURCE_URL),
+          propertyValue(
+            "jdbc:tc:sqlserver:///;database=" + properties.projectBaseName().name() + ";trustServerCertificate=true?TC_TMPFS=/testtmpfs:rw"
+          )
+        )
+        .set(propertyKey(SPRING_DATASOURCE_USERNAME), propertyValue("SA"))
+        .set(propertyKey("spring.datasource.password"), propertyValue("yourStrong(!)Password"))
+        .and()
+      .mandatoryReplacements()
+        .in(path("src/test/java").append(properties.basePackage().path()).append("IntegrationTest.java"))
+          .add(
+            lineBeforeText("import org.springframework.boot.test.context.SpringBootTest;"),
+            "import org.junit.jupiter.api.extension.ExtendWith;"
+          )
+          .add(lineBeforeText("public @interface"), "@ExtendWith(MsSQLTestContainerExtension.class)")
+          .and()
+        .and()
+      .springMainLogger("com.microsoft.sqlserver", LogLevel.WARN)
+      .springMainLogger("org.reflections", LogLevel.WARN)
+      .build();
+    //@formatter:on
+  }
+}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/sqlcommon/domain/SQLCommonModuleBuilder.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/domain/SQLCommonModuleBuilder.java
similarity index 94%
rename from src/main/java/tech/jhipster/lite/generator/server/springboot/database/sqlcommon/domain/SQLCommonModuleBuilder.java
rename to src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/domain/SQLCommonModuleBuilder.java
index 7ce931a6d..32abfa236 100644
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/sqlcommon/domain/SQLCommonModuleBuilder.java
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/domain/SQLCommonModuleBuilder.java
@@ -1,4 +1,4 @@
-package tech.jhipster.lite.generator.server.springboot.database.sqlcommon.domain;
+package tech.jhipster.lite.generator.server.springboot.database.jpa.domain;
 
 import static tech.jhipster.lite.module.domain.JHipsterModule.JHipsterModuleBuilder;
 import static tech.jhipster.lite.module.domain.JHipsterModule.artifactId;
@@ -11,7 +11,6 @@ import static tech.jhipster.lite.module.domain.JHipsterModule.propertyValue;
 import static tech.jhipster.lite.module.domain.JHipsterModule.toSrcMainDocker;
 import static tech.jhipster.lite.module.domain.JHipsterModule.toSrcMainJava;
 
-import tech.jhipster.lite.generator.server.springboot.database.common.domain.DatabaseType;
 import tech.jhipster.lite.module.domain.DocumentationTitle;
 import tech.jhipster.lite.module.domain.LogLevel;
 import tech.jhipster.lite.module.domain.docker.DockerImageVersion;
@@ -24,7 +23,7 @@ import tech.jhipster.lite.module.domain.javaproperties.PropertyValue;
 import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
 import tech.jhipster.lite.shared.error.domain.Assert;
 
-public final class SQLCommonModuleBuilder {
+final class SQLCommonModuleBuilder {
 
   private static final String ORG_HIBERNATE = "org.hibernate.orm";
   private static final PropertyValue FALSE = propertyValue(false);
@@ -46,7 +45,7 @@ public final class SQLCommonModuleBuilder {
     Assert.notNull("testContainerArtifactId", testContainerArtifactId);
 
     String databaseId = databaseType.id();
-    JHipsterSource source = from("server/springboot/database/" + databaseType.id());
+    JHipsterSource source = from("server/springboot/database/jpa");
     JHipsterDestination mainDestination = toSrcMainJava()
       .append(properties.packagePath())
       .append("wire")
@@ -57,15 +56,16 @@ public final class SQLCommonModuleBuilder {
     return moduleBuilder(properties)
       .context()
         .put("srcMainDocker", "src/main/docker") // To be used in <databaseId>>.md file
+        .put("databaseType", databaseId)
         .put(databaseId + "DockerImageWithVersion", dockerImage.fullName()) // To be used in <databaseId>.yml docker-compose file
         .and()
-      .documentation(documentationTitle, source.template(databaseId + ".md"))
+      .documentation(documentationTitle, source.template("databaseType.md"))
       .startupCommands()
         .dockerCompose(startupCommand(databaseId))
         .and()
       .files()
         .add(source.template("DatabaseConfiguration.java"), mainDestination.append("DatabaseConfiguration.java"))
-        .add(source.template(databaseId + ".yml"), toSrcMainDocker().append(databaseId + ".yml"))
+        .add(source.append("docker").template(databaseId + ".yml"), toSrcMainDocker().append(databaseId + ".yml"))
         .and()
       .javaDependencies()
         .addDependency(groupId("org.springframework.boot"), artifactId("spring-boot-starter-data-jpa"))
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/infrastructure/primary/JpaModuleConfiguration.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/infrastructure/primary/JpaModuleConfiguration.java
new file mode 100644
index 000000000..d0ed49b5c
--- /dev/null
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/infrastructure/primary/JpaModuleConfiguration.java
@@ -0,0 +1,82 @@
+package tech.jhipster.lite.generator.server.springboot.database.jpa.infrastructure.primary;
+
+import static tech.jhipster.lite.shared.slug.domain.JHLiteFeatureSlug.JPA_PERSISTENCE;
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.JPA_MARIADB;
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.JPA_MSSQL;
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.JPA_MYSQL;
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.JPA_POSTGRESQL;
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.SPRING_BOOT;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import tech.jhipster.lite.generator.server.springboot.database.jpa.application.JpaApplicationService;
+import tech.jhipster.lite.module.domain.resource.JHipsterModuleOrganization;
+import tech.jhipster.lite.module.domain.resource.JHipsterModulePropertiesDefinition;
+import tech.jhipster.lite.module.domain.resource.JHipsterModuleResource;
+
+@Configuration
+class JpaModuleConfiguration {
+
+  private static final String API_DOC_GROUP = "Spring Boot - Database";
+
+  @Bean
+  JHipsterModuleResource postgresqlModule(JpaApplicationService postgresql) {
+    return JHipsterModuleResource.builder()
+      .slug(JPA_POSTGRESQL)
+      .propertiesDefinition(properties())
+      .apiDoc(API_DOC_GROUP, "Add JPA with Postgresql to project")
+      .organization(organization())
+      .tags(tags())
+      .factory(postgresql::buildPostgresql);
+  }
+
+  @Bean
+  JHipsterModuleResource mariaDBModule(JpaApplicationService applicationService) {
+    return JHipsterModuleResource.builder()
+      .slug(JPA_MARIADB)
+      .propertiesDefinition(properties())
+      .apiDoc(API_DOC_GROUP, "Add JPA with MariaDB to project")
+      .organization(organization())
+      .tags(tags())
+      .factory(applicationService::buildMariaDB);
+  }
+
+  @Bean
+  JHipsterModuleResource mySQLModule(JpaApplicationService applicationService) {
+    return JHipsterModuleResource.builder()
+      .slug(JPA_MYSQL)
+      .propertiesDefinition(properties())
+      .apiDoc(API_DOC_GROUP, "Add JPA with MySQL to project")
+      .organization(organization())
+      .tags(tags())
+      .factory(applicationService::buildMySQL);
+  }
+
+  @Bean
+  JHipsterModuleResource msSQLModule(JpaApplicationService applicationService) {
+    return JHipsterModuleResource.builder()
+      .slug(JPA_MSSQL)
+      .propertiesDefinition(properties())
+      .apiDoc(API_DOC_GROUP, "Add JPA with MsSQL to project")
+      .organization(organization())
+      .tags(tags())
+      .factory(applicationService::buildMsSQL);
+  }
+
+  private static JHipsterModulePropertiesDefinition properties() {
+    return JHipsterModulePropertiesDefinition.builder()
+      .addBasePackage()
+      .addIndentation()
+      .addProjectBaseName()
+      .addSpringConfigurationFormat()
+      .build();
+  }
+
+  private static JHipsterModuleOrganization organization() {
+    return JHipsterModuleOrganization.builder().feature(JPA_PERSISTENCE).addDependency(SPRING_BOOT).build();
+  }
+
+  private static String[] tags() {
+    return new String[] { "server", "spring", "spring-boot", "database" };
+  }
+}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mssql/package-info.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/package-info.java
similarity index 93%
rename from src/main/java/tech/jhipster/lite/generator/server/springboot/database/mssql/package-info.java
rename to src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/package-info.java
index 516791eab..bd0b2a13d 100644
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mssql/package-info.java
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/jpa/package-info.java
@@ -1,2 +1,2 @@
 @tech.jhipster.lite.BusinessContext
-package tech.jhipster.lite.generator.server.springboot.database.mssql;
+package tech.jhipster.lite.generator.server.springboot.database.jpa;
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/application/MariaDBApplicationService.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/application/MariaDBApplicationService.java
deleted file mode 100644
index d6aa45679..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/application/MariaDBApplicationService.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.mariadb.application;
-
-import org.springframework.stereotype.Service;
-import tech.jhipster.lite.generator.server.springboot.database.mariadb.domain.MariaDBModuleFactory;
-import tech.jhipster.lite.module.domain.JHipsterModule;
-import tech.jhipster.lite.module.domain.docker.DockerImages;
-import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
-
-@Service
-public class MariaDBApplicationService {
-
-  private final MariaDBModuleFactory factory;
-
-  public MariaDBApplicationService(DockerImages dockerImages) {
-    factory = new MariaDBModuleFactory(dockerImages);
-  }
-
-  public JHipsterModule build(JHipsterModuleProperties properties) {
-    return factory.buildModule(properties);
-  }
-}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/domain/MariaDBModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/domain/MariaDBModuleFactory.java
deleted file mode 100644
index 80c7dac72..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/domain/MariaDBModuleFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.mariadb.domain;
-
-import static tech.jhipster.lite.generator.server.springboot.database.sqlcommon.domain.SQLCommonModuleBuilder.sqlCommonModuleBuilder;
-import static tech.jhipster.lite.module.domain.JHipsterModule.artifactId;
-import static tech.jhipster.lite.module.domain.JHipsterModule.documentationTitle;
-import static tech.jhipster.lite.module.domain.JHipsterModule.javaDependency;
-import static tech.jhipster.lite.module.domain.JHipsterModule.propertyKey;
-import static tech.jhipster.lite.module.domain.JHipsterModule.propertyValue;
-
-import tech.jhipster.lite.generator.server.springboot.database.common.domain.DatabaseType;
-import tech.jhipster.lite.module.domain.JHipsterModule;
-import tech.jhipster.lite.module.domain.docker.DockerImages;
-import tech.jhipster.lite.module.domain.javadependency.JavaDependencyScope;
-import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
-import tech.jhipster.lite.shared.error.domain.Assert;
-
-public class MariaDBModuleFactory {
-
-  private final DockerImages dockerImages;
-
-  public MariaDBModuleFactory(DockerImages dockerImages) {
-    Assert.notNull("dockerImages", dockerImages);
-
-    this.dockerImages = dockerImages;
-  }
-
-  public JHipsterModule buildModule(JHipsterModuleProperties properties) {
-    Assert.notNull("properties", properties);
-
-    return sqlCommonModuleBuilder(
-      properties,
-      DatabaseType.MARIADB,
-      dockerImages.get("mariadb"),
-      documentationTitle("MariaDB"),
-      artifactId("mariadb")
-    )
-      .javaDependencies()
-      .addDependency(
-        javaDependency().groupId("org.mariadb.jdbc").artifactId("mariadb-java-client").scope(JavaDependencyScope.RUNTIME).build()
-      )
-      .and()
-      .springMainProperties()
-      .set(propertyKey("spring.datasource.url"), propertyValue("jdbc:mariadb://localhost:3306/" + properties.projectBaseName().name()))
-      .set(propertyKey("spring.datasource.username"), propertyValue("root"))
-      .set(propertyKey("spring.datasource.driver-class-name"), propertyValue("org.mariadb.jdbc.Driver"))
-      .and()
-      .build();
-  }
-}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/infrastructure/primary/MariaDBModuleConfiguration.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/infrastructure/primary/MariaDBModuleConfiguration.java
deleted file mode 100644
index 9e5126780..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/infrastructure/primary/MariaDBModuleConfiguration.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.mariadb.infrastructure.primary;
-
-import static tech.jhipster.lite.shared.slug.domain.JHLiteFeatureSlug.JPA_PERSISTENCE;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.MARIADB;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.SPRING_BOOT;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import tech.jhipster.lite.generator.server.springboot.database.mariadb.application.MariaDBApplicationService;
-import tech.jhipster.lite.module.domain.resource.JHipsterModuleOrganization;
-import tech.jhipster.lite.module.domain.resource.JHipsterModulePropertiesDefinition;
-import tech.jhipster.lite.module.domain.resource.JHipsterModuleResource;
-
-@Configuration
-class MariaDBModuleConfiguration {
-
-  @Bean
-  JHipsterModuleResource mariaDBModule(MariaDBApplicationService applicationService) {
-    return JHipsterModuleResource.builder()
-      .slug(MARIADB)
-      .propertiesDefinition(
-        JHipsterModulePropertiesDefinition.builder()
-          .addBasePackage()
-          .addIndentation()
-          .addProjectBaseName()
-          .addSpringConfigurationFormat()
-          .build()
-      )
-      .apiDoc("Spring Boot - Database", "Add MariaDB to project")
-      .organization(JHipsterModuleOrganization.builder().feature(JPA_PERSISTENCE).addDependency(SPRING_BOOT).build())
-      .tags("server", "spring", "spring-boot", "database")
-      .factory(applicationService::build);
-  }
-}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/package-info.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/package-info.java
deleted file mode 100644
index e3ea4d620..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/package-info.java
+++ /dev/null
@@ -1,2 +0,0 @@
-@tech.jhipster.lite.BusinessContext
-package tech.jhipster.lite.generator.server.springboot.database.mariadb;
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mssql/application/MsSQLApplicationService.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mssql/application/MsSQLApplicationService.java
deleted file mode 100644
index 438811044..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mssql/application/MsSQLApplicationService.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.mssql.application;
-
-import org.springframework.stereotype.Service;
-import tech.jhipster.lite.generator.server.springboot.database.mssql.domain.MsSQLModuleFactory;
-import tech.jhipster.lite.module.domain.JHipsterModule;
-import tech.jhipster.lite.module.domain.docker.DockerImages;
-import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
-
-@Service
-public class MsSQLApplicationService {
-
-  private final MsSQLModuleFactory factory;
-
-  public MsSQLApplicationService(DockerImages dockerImages) {
-    factory = new MsSQLModuleFactory(dockerImages);
-  }
-
-  public JHipsterModule build(JHipsterModuleProperties properties) {
-    return factory.buildModule(properties);
-  }
-}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mssql/domain/MsSQLModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mssql/domain/MsSQLModuleFactory.java
deleted file mode 100644
index df27ac78c..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mssql/domain/MsSQLModuleFactory.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.mssql.domain;
-
-import static tech.jhipster.lite.generator.server.springboot.database.sqlcommon.domain.SQLCommonModuleBuilder.sqlCommonModuleBuilder;
-import static tech.jhipster.lite.module.domain.JHipsterModule.artifactId;
-import static tech.jhipster.lite.module.domain.JHipsterModule.documentationTitle;
-import static tech.jhipster.lite.module.domain.JHipsterModule.from;
-import static tech.jhipster.lite.module.domain.JHipsterModule.javaDependency;
-import static tech.jhipster.lite.module.domain.JHipsterModule.lineBeforeText;
-import static tech.jhipster.lite.module.domain.JHipsterModule.path;
-import static tech.jhipster.lite.module.domain.JHipsterModule.propertyKey;
-import static tech.jhipster.lite.module.domain.JHipsterModule.propertyValue;
-import static tech.jhipster.lite.module.domain.JHipsterModule.to;
-import static tech.jhipster.lite.module.domain.JHipsterModule.toSrcTestJava;
-
-import tech.jhipster.lite.generator.server.springboot.database.common.domain.DatabaseType;
-import tech.jhipster.lite.module.domain.JHipsterModule;
-import tech.jhipster.lite.module.domain.LogLevel;
-import tech.jhipster.lite.module.domain.docker.DockerImageVersion;
-import tech.jhipster.lite.module.domain.docker.DockerImages;
-import tech.jhipster.lite.module.domain.file.JHipsterSource;
-import tech.jhipster.lite.module.domain.javadependency.JavaDependencyScope;
-import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
-import tech.jhipster.lite.shared.error.domain.Assert;
-
-public class MsSQLModuleFactory {
-
-  private final DockerImages dockerImages;
-
-  public MsSQLModuleFactory(DockerImages dockerImages) {
-    Assert.notNull("dockerImages", dockerImages);
-
-    this.dockerImages = dockerImages;
-  }
-
-  public JHipsterModule buildModule(JHipsterModuleProperties properties) {
-    Assert.notNull("properties", properties);
-
-    DockerImageVersion dockerImage = dockerImages.get("mcr.microsoft.com/mssql/server");
-    JHipsterSource source = from("server/springboot/database/" + DatabaseType.MSSQL.id());
-
-    //@formatter:off
-    return sqlCommonModuleBuilder(properties, DatabaseType.MSSQL, dockerImage, documentationTitle("MsSQL"), artifactId("mssqlserver"))
-      .files()
-        .add(source.template("container-license-acceptance.txt"), to("src/test/resources/container-license-acceptance.txt"))
-        .add(
-          source.template("MsSQLTestContainerExtension.java"),
-          toSrcTestJava().append(properties.basePackage().path()).append("MsSQLTestContainerExtension.java")
-        )
-        .and()
-      .javaDependencies()
-        .addDependency(javaDependency().groupId("com.microsoft.sqlserver").artifactId("mssql-jdbc").scope(JavaDependencyScope.RUNTIME).build())
-        .and()
-      .springMainProperties()
-        .set(
-          propertyKey("spring.datasource.url"),
-          propertyValue("jdbc:sqlserver://localhost:1433;database=" + properties.projectBaseName().name() + ";trustServerCertificate=true")
-        )
-        .set(propertyKey("spring.datasource.username"), propertyValue("SA"))
-        .set(propertyKey("spring.datasource.password"), propertyValue("yourStrong(!)Password"))
-        .set(propertyKey("spring.datasource.driver-class-name"), propertyValue("com.microsoft.sqlserver.jdbc.SQLServerDriver"))
-        .set(propertyKey("spring.jpa.hibernate.ddl-auto"), propertyValue("update"))
-        .set(propertyKey("spring.jpa.properties.hibernate.criteria.literal_handling_mode"), propertyValue("BIND"))
-        .set(propertyKey("spring.jpa.properties.hibernate.dialect"), propertyValue("org.hibernate.dialect.SQLServer2012Dialect"))
-        .set(propertyKey("spring.jpa.properties.hibernate.format_sql"), propertyValue(true))
-        .set(propertyKey("spring.jpa.properties.hibernate.jdbc.fetch_size"), propertyValue(150))
-        .and()
-      .springTestProperties()
-        .set(
-          propertyKey("spring.datasource.url"),
-          propertyValue(
-            "jdbc:tc:sqlserver:///;database=" + properties.projectBaseName().name() + ";trustServerCertificate=true?TC_TMPFS=/testtmpfs:rw"
-          )
-        )
-        .set(propertyKey("spring.datasource.username"), propertyValue("SA"))
-        .set(propertyKey("spring.datasource.password"), propertyValue("yourStrong(!)Password"))
-        .and()
-      .mandatoryReplacements()
-        .in(path("src/test/java").append(properties.basePackage().path()).append("IntegrationTest.java"))
-          .add(
-            lineBeforeText("import org.springframework.boot.test.context.SpringBootTest;"),
-            "import org.junit.jupiter.api.extension.ExtendWith;"
-          )
-          .add(lineBeforeText("public @interface"), "@ExtendWith(MsSQLTestContainerExtension.class)")
-          .and()
-        .and()
-      .springMainLogger("com.microsoft.sqlserver", LogLevel.WARN)
-      .springMainLogger("org.reflections", LogLevel.WARN)
-      .build();
-    //@formatter:on
-  }
-}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mssql/infrastructure/primary/MsSQLModuleConfiguration.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mssql/infrastructure/primary/MsSQLModuleConfiguration.java
deleted file mode 100644
index fdee6c6a1..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mssql/infrastructure/primary/MsSQLModuleConfiguration.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.mssql.infrastructure.primary;
-
-import static tech.jhipster.lite.shared.slug.domain.JHLiteFeatureSlug.JPA_PERSISTENCE;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.MSSQL;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.SPRING_BOOT;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import tech.jhipster.lite.generator.server.springboot.database.mssql.application.MsSQLApplicationService;
-import tech.jhipster.lite.module.domain.resource.JHipsterModuleOrganization;
-import tech.jhipster.lite.module.domain.resource.JHipsterModulePropertiesDefinition;
-import tech.jhipster.lite.module.domain.resource.JHipsterModuleResource;
-
-@Configuration
-class MsSQLModuleConfiguration {
-
-  @Bean
-  JHipsterModuleResource msSQLModule(MsSQLApplicationService applicationService) {
-    return JHipsterModuleResource.builder()
-      .slug(MSSQL)
-      .propertiesDefinition(
-        JHipsterModulePropertiesDefinition.builder()
-          .addBasePackage()
-          .addIndentation()
-          .addProjectBaseName()
-          .addSpringConfigurationFormat()
-          .build()
-      )
-      .apiDoc("Spring Boot - Database", "Add MsSQL to project")
-      .organization(JHipsterModuleOrganization.builder().feature(JPA_PERSISTENCE).addDependency(SPRING_BOOT).build())
-      .tags("server", "database", "mssql")
-      .factory(applicationService::build);
-  }
-}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mysql/application/MySQLApplicationService.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mysql/application/MySQLApplicationService.java
deleted file mode 100644
index 4c94466bc..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mysql/application/MySQLApplicationService.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.mysql.application;
-
-import org.springframework.stereotype.Service;
-import tech.jhipster.lite.generator.server.springboot.database.mysql.domain.MySQLModuleFactory;
-import tech.jhipster.lite.module.domain.JHipsterModule;
-import tech.jhipster.lite.module.domain.docker.DockerImages;
-import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
-
-@Service
-public class MySQLApplicationService {
-
-  private final MySQLModuleFactory factory;
-
-  public MySQLApplicationService(DockerImages dockerImages) {
-    factory = new MySQLModuleFactory(dockerImages);
-  }
-
-  public JHipsterModule build(JHipsterModuleProperties properties) {
-    return factory.buildModule(properties);
-  }
-}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mysql/domain/MySQLModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mysql/domain/MySQLModuleFactory.java
deleted file mode 100644
index e8161221a..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mysql/domain/MySQLModuleFactory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.mysql.domain;
-
-import static tech.jhipster.lite.generator.server.springboot.database.sqlcommon.domain.SQLCommonModuleBuilder.sqlCommonModuleBuilder;
-import static tech.jhipster.lite.module.domain.JHipsterModule.artifactId;
-import static tech.jhipster.lite.module.domain.JHipsterModule.documentationTitle;
-import static tech.jhipster.lite.module.domain.JHipsterModule.javaDependency;
-import static tech.jhipster.lite.module.domain.JHipsterModule.propertyKey;
-import static tech.jhipster.lite.module.domain.JHipsterModule.propertyValue;
-
-import tech.jhipster.lite.generator.server.springboot.database.common.domain.DatabaseType;
-import tech.jhipster.lite.module.domain.JHipsterModule;
-import tech.jhipster.lite.module.domain.docker.DockerImages;
-import tech.jhipster.lite.module.domain.javadependency.JavaDependencyScope;
-import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
-import tech.jhipster.lite.shared.error.domain.Assert;
-
-public class MySQLModuleFactory {
-
-  private static final String MYSQL = "mysql";
-  private static final String MYSQL_GROUP_ID = "com.mysql";
-  private static final String MYSQL_ARTIFACT_ID = "mysql-connector-j";
-
-  private final DockerImages dockerImages;
-
-  public MySQLModuleFactory(DockerImages dockerImages) {
-    Assert.notNull("dockerImages", dockerImages);
-
-    this.dockerImages = dockerImages;
-  }
-
-  public JHipsterModule buildModule(JHipsterModuleProperties properties) {
-    Assert.notNull("properties", properties);
-
-    return sqlCommonModuleBuilder(properties, DatabaseType.MYSQL, dockerImages.get(MYSQL), documentationTitle("MySQL"), artifactId(MYSQL))
-      .javaDependencies()
-      .addDependency(javaDependency().groupId(MYSQL_GROUP_ID).artifactId(MYSQL_ARTIFACT_ID).scope(JavaDependencyScope.RUNTIME).build())
-      .and()
-      .springMainProperties()
-      .set(propertyKey("spring.datasource.url"), propertyValue("jdbc:mysql://localhost:3306/" + properties.projectBaseName().name()))
-      .set(propertyKey("spring.datasource.username"), propertyValue("root"))
-      .set(propertyKey("spring.datasource.driver-class-name"), propertyValue("com.mysql.cj.jdbc.Driver"))
-      .and()
-      .build();
-  }
-}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mysql/infrastructure/primary/MySQLModuleConfiguration.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mysql/infrastructure/primary/MySQLModuleConfiguration.java
deleted file mode 100644
index 88ecf3148..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mysql/infrastructure/primary/MySQLModuleConfiguration.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.mysql.infrastructure.primary;
-
-import static tech.jhipster.lite.shared.slug.domain.JHLiteFeatureSlug.JPA_PERSISTENCE;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.MYSQL;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.SPRING_BOOT;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import tech.jhipster.lite.generator.server.springboot.database.mysql.application.MySQLApplicationService;
-import tech.jhipster.lite.module.domain.resource.JHipsterModuleOrganization;
-import tech.jhipster.lite.module.domain.resource.JHipsterModulePropertiesDefinition;
-import tech.jhipster.lite.module.domain.resource.JHipsterModuleResource;
-
-@Configuration
-class MySQLModuleConfiguration {
-
-  @Bean
-  JHipsterModuleResource mySQLModule(MySQLApplicationService applicationService) {
-    return JHipsterModuleResource.builder()
-      .slug(MYSQL)
-      .propertiesDefinition(
-        JHipsterModulePropertiesDefinition.builder()
-          .addBasePackage()
-          .addIndentation()
-          .addProjectBaseName()
-          .addSpringConfigurationFormat()
-          .build()
-      )
-      .apiDoc("Spring Boot - Database", "Add MySQL to project")
-      .organization(JHipsterModuleOrganization.builder().feature(JPA_PERSISTENCE).addDependency(SPRING_BOOT).build())
-      .tags("server", "spring", "spring-boot", "database")
-      .factory(applicationService::build);
-  }
-}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mysql/package-info.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mysql/package-info.java
deleted file mode 100644
index ba3c9caa4..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/mysql/package-info.java
+++ /dev/null
@@ -1,2 +0,0 @@
-@tech.jhipster.lite.BusinessContext
-package tech.jhipster.lite.generator.server.springboot.database.mysql;
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/application/PostgresqlApplicationService.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/application/PostgresqlApplicationService.java
deleted file mode 100644
index 76f630ca6..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/application/PostgresqlApplicationService.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.postgresql.application;
-
-import org.springframework.stereotype.Service;
-import tech.jhipster.lite.generator.server.springboot.database.postgresql.domain.PostgresqlModuleFactory;
-import tech.jhipster.lite.module.domain.JHipsterModule;
-import tech.jhipster.lite.module.domain.docker.DockerImages;
-import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
-
-@Service
-public class PostgresqlApplicationService {
-
-  private final PostgresqlModuleFactory factory;
-
-  public PostgresqlApplicationService(DockerImages dockerImages) {
-    factory = new PostgresqlModuleFactory(dockerImages);
-  }
-
-  public JHipsterModule build(JHipsterModuleProperties properties) {
-    return factory.buildModule(properties);
-  }
-}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/domain/PostgresqlModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/domain/PostgresqlModuleFactory.java
deleted file mode 100644
index 9d1dea6a4..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/domain/PostgresqlModuleFactory.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.postgresql.domain;
-
-import static tech.jhipster.lite.generator.server.springboot.database.sqlcommon.domain.SQLCommonModuleBuilder.sqlCommonModuleBuilder;
-import static tech.jhipster.lite.module.domain.JHipsterModule.artifactId;
-import static tech.jhipster.lite.module.domain.JHipsterModule.documentationTitle;
-import static tech.jhipster.lite.module.domain.JHipsterModule.groupId;
-import static tech.jhipster.lite.module.domain.JHipsterModule.propertyKey;
-import static tech.jhipster.lite.module.domain.JHipsterModule.propertyValue;
-
-import tech.jhipster.lite.generator.server.springboot.database.common.domain.DatabaseType;
-import tech.jhipster.lite.module.domain.JHipsterModule;
-import tech.jhipster.lite.module.domain.LogLevel;
-import tech.jhipster.lite.module.domain.docker.DockerImageVersion;
-import tech.jhipster.lite.module.domain.docker.DockerImages;
-import tech.jhipster.lite.module.domain.javadependency.JavaDependency;
-import tech.jhipster.lite.module.domain.javadependency.JavaDependencyScope;
-import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
-import tech.jhipster.lite.shared.error.domain.Assert;
-
-public class PostgresqlModuleFactory {
-
-  public static final String ORG_POSTGRESQL = "org.postgresql";
-
-  private final DockerImages dockerImages;
-
-  public PostgresqlModuleFactory(DockerImages dockerImages) {
-    this.dockerImages = dockerImages;
-  }
-
-  public JHipsterModule buildModule(JHipsterModuleProperties properties) {
-    Assert.notNull("properties", properties);
-
-    DockerImageVersion dockerImage = dockerImages.get("postgres");
-
-    return sqlCommonModuleBuilder(
-      properties,
-      DatabaseType.POSTGRESQL,
-      dockerImage,
-      documentationTitle("Postgresql"),
-      artifactId("postgresql")
-    )
-      .javaDependencies()
-      .addDependency(
-        JavaDependency.builder()
-          .groupId(groupId(ORG_POSTGRESQL))
-          .artifactId(artifactId("postgresql"))
-          .scope(JavaDependencyScope.RUNTIME)
-          .build()
-      )
-      .and()
-      .springMainProperties()
-      .set(propertyKey("spring.datasource.url"), propertyValue("jdbc:postgresql://localhost:5432/" + properties.projectBaseName().name()))
-      .set(propertyKey("spring.datasource.username"), propertyValue(properties.projectBaseName().name()))
-      .set(propertyKey("spring.datasource.driver-class-name"), propertyValue("org.postgresql.Driver"))
-      .and()
-      .springTestProperties()
-      .set(
-        propertyKey("spring.datasource.url"),
-        propertyValue(
-          "jdbc:tc:postgresql:" + dockerImage.version().get() + ":///" + properties.projectBaseName().name() + "?TC_TMPFS=/testtmpfs:rw"
-        )
-      )
-      .and()
-      .springMainLogger(ORG_POSTGRESQL, LogLevel.WARN)
-      .springTestLogger(ORG_POSTGRESQL, LogLevel.WARN)
-      .springTestLogger("org.jboss.logging", LogLevel.WARN)
-      .build();
-  }
-}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/infrastructure/primary/PostgresqlModuleConfiguration.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/infrastructure/primary/PostgresqlModuleConfiguration.java
deleted file mode 100644
index 33a871914..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/infrastructure/primary/PostgresqlModuleConfiguration.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.postgresql.infrastructure.primary;
-
-import static tech.jhipster.lite.shared.slug.domain.JHLiteFeatureSlug.JPA_PERSISTENCE;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.POSTGRESQL;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.SPRING_BOOT;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import tech.jhipster.lite.generator.server.springboot.database.postgresql.application.PostgresqlApplicationService;
-import tech.jhipster.lite.module.domain.resource.JHipsterModuleOrganization;
-import tech.jhipster.lite.module.domain.resource.JHipsterModulePropertiesDefinition;
-import tech.jhipster.lite.module.domain.resource.JHipsterModuleResource;
-
-@Configuration
-class PostgresqlModuleConfiguration {
-
-  public static final String URL_POSTGRESQL_MODULE = "/api/servers/spring-boot/databases/postgresql";
-
-  @Bean
-  JHipsterModuleResource postgresqlModule(PostgresqlApplicationService postgresql) {
-    return JHipsterModuleResource.builder()
-      .slug(POSTGRESQL)
-      .propertiesDefinition(
-        JHipsterModulePropertiesDefinition.builder()
-          .addBasePackage()
-          .addIndentation()
-          .addProjectBaseName()
-          .addSpringConfigurationFormat()
-          .build()
-      )
-      .apiDoc("Spring Boot - Database", "Add Postgresql to project")
-      .organization(JHipsterModuleOrganization.builder().feature(JPA_PERSISTENCE).addDependency(SPRING_BOOT).build())
-      .tags("server", "spring", "spring-boot", "database")
-      .factory(postgresql::build);
-  }
-}
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/package-info.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/package-info.java
deleted file mode 100644
index be6f3ed74..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/package-info.java
+++ /dev/null
@@ -1,2 +0,0 @@
-@tech.jhipster.lite.BusinessContext
-package tech.jhipster.lite.generator.server.springboot.database.postgresql;
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/sqlcommon/package-info.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/database/sqlcommon/package-info.java
deleted file mode 100644
index 058068376..000000000
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/database/sqlcommon/package-info.java
+++ /dev/null
@@ -1,2 +0,0 @@
-@tech.jhipster.lite.SharedKernel
-package tech.jhipster.lite.generator.server.springboot.database.sqlcommon;
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/dbmigration/flyway/infrastructure/primary/FlywayModuleConfiguration.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/dbmigration/flyway/infrastructure/primary/FlywayModuleConfiguration.java
index 7fb188d3f..1ee8ca90d 100644
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/dbmigration/flyway/infrastructure/primary/FlywayModuleConfiguration.java
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/dbmigration/flyway/infrastructure/primary/FlywayModuleConfiguration.java
@@ -7,10 +7,10 @@ import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.FLYWAY_MARI
 import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.FLYWAY_MSSQL;
 import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.FLYWAY_MYSQL;
 import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.FLYWAY_POSTGRESQL;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.MARIADB;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.MSSQL;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.MYSQL;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.POSTGRESQL;
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.JPA_MARIADB;
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.JPA_MSSQL;
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.JPA_MYSQL;
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.JPA_POSTGRESQL;
 
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -43,7 +43,7 @@ class FlywayModuleConfiguration {
       .slug(FLYWAY_MYSQL)
       .propertiesDefinition(JHipsterModulePropertiesDefinition.builder().addBasePackage().addIndentation().build())
       .apiDoc(API_DOC_GROUP, "Add Flyway MySQL")
-      .organization(JHipsterModuleOrganization.builder().addDependency(FLYWAY).addDependency(MYSQL).build())
+      .organization(JHipsterModuleOrganization.builder().addDependency(FLYWAY).addDependency(JPA_MYSQL).build())
       .tags(flywayTags())
       .factory(flyway::buildMysqlDependencyModule);
   }
@@ -54,7 +54,7 @@ class FlywayModuleConfiguration {
       .slug(FLYWAY_MARIADB)
       .propertiesDefinition(JHipsterModulePropertiesDefinition.builder().addBasePackage().addIndentation().build())
       .apiDoc(API_DOC_GROUP, "Add Flyway MariaDB")
-      .organization(JHipsterModuleOrganization.builder().addDependency(FLYWAY).addDependency(MARIADB).build())
+      .organization(JHipsterModuleOrganization.builder().addDependency(FLYWAY).addDependency(JPA_MARIADB).build())
       .tags(flywayTags())
       .factory(flyway::buildMysqlDependencyModule);
   }
@@ -65,7 +65,7 @@ class FlywayModuleConfiguration {
       .slug(FLYWAY_POSTGRESQL)
       .propertiesDefinition(JHipsterModulePropertiesDefinition.builder().addBasePackage().addIndentation().build())
       .apiDoc(API_DOC_GROUP, "Add Flyway PostgreSQL")
-      .organization(JHipsterModuleOrganization.builder().addDependency(FLYWAY).addDependency(POSTGRESQL).build())
+      .organization(JHipsterModuleOrganization.builder().addDependency(FLYWAY).addDependency(JPA_POSTGRESQL).build())
       .tags(flywayTags())
       .factory(flyway::buildPostgresqlDependencyModule);
   }
@@ -76,7 +76,7 @@ class FlywayModuleConfiguration {
       .slug(FLYWAY_MSSQL)
       .propertiesDefinition(JHipsterModulePropertiesDefinition.builder().addBasePackage().addIndentation().build())
       .apiDoc(API_DOC_GROUP, "Add Flyway PostgreSQL")
-      .organization(JHipsterModuleOrganization.builder().addDependency(FLYWAY).addDependency(MSSQL).build())
+      .organization(JHipsterModuleOrganization.builder().addDependency(FLYWAY).addDependency(JPA_MSSQL).build())
       .tags(flywayTags())
       .factory(flyway::buildMsSqlServerDependencyModule);
   }
diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/flyway/infrastructure/primary/SampleFlywayModuleConfiguration.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/flyway/infrastructure/primary/SampleFlywayModuleConfiguration.java
index 698584996..6eed2c7e5 100644
--- a/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/flyway/infrastructure/primary/SampleFlywayModuleConfiguration.java
+++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/mvc/sample/flyway/infrastructure/primary/SampleFlywayModuleConfiguration.java
@@ -3,7 +3,7 @@ package tech.jhipster.lite.generator.server.springboot.mvc.sample.flyway.infrast
 import static tech.jhipster.lite.shared.slug.domain.JHLiteFeatureSlug.SAMPLE_SCHEMA;
 import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.FLYWAY;
 import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.FLYWAY_POSTGRESQL;
-import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.POSTGRESQL;
+import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.JPA_POSTGRESQL;
 import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.SAMPLE_FEATURE;
 import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.SAMPLE_NOT_POSTGRESQL_FLYWAY_CHANGELOG;
 import static tech.jhipster.lite.shared.slug.domain.JHLiteModuleSlug.SAMPLE_POSTGRESQL_FLYWAY_CHANGELOG;
@@ -28,7 +28,7 @@ class SampleFlywayModuleConfiguration {
           .feature(SAMPLE_SCHEMA)
           .addDependency(FLYWAY_POSTGRESQL)
           .addDependency(SAMPLE_FEATURE)
-          .addDependency(POSTGRESQL)
+          .addDependency(JPA_POSTGRESQL)
           .build()
       )
       .tags("server")
diff --git a/src/main/java/tech/jhipster/lite/shared/slug/domain/JHLiteModuleSlug.java b/src/main/java/tech/jhipster/lite/shared/slug/domain/JHLiteModuleSlug.java
index 247c93826..04ea9e74d 100644
--- a/src/main/java/tech/jhipster/lite/shared/slug/domain/JHLiteModuleSlug.java
+++ b/src/main/java/tech/jhipster/lite/shared/slug/domain/JHLiteModuleSlug.java
@@ -60,6 +60,10 @@ public enum JHLiteModuleSlug implements JHipsterModuleSlugFactory {
   JIB("jib"),
   JMOLECULES("jmolecules"),
   JPA_PAGINATION("jpa-pagination"),
+  JPA_MARIADB("jpa-mariadb"),
+  JPA_MSSQL("jpa-mssql"),
+  JPA_MYSQL("jpa-mysql"),
+  JPA_POSTGRESQL("jpa-postgresql"),
   JQASSISTANT("jqassistant"),
   JQASSISTANT_JMOLECULES("jqassistant-jmolecules"),
   JQASSISTANT_SPRING("jqassistant-spring"),
@@ -72,13 +76,10 @@ public enum JHLiteModuleSlug implements JHipsterModuleSlugFactory {
   LIQUIBASE_ASYNC("liquibase-async"),
   LOGSTASH("logstash"),
   LOGS_SPY("logs-spy"),
-  MARIADB("mariadb"),
   MAVEN_JAVA("maven-java"),
   MAVEN_WRAPPER("maven-wrapper"),
   MONGOCK("mongock"),
   MONGODB("mongodb"),
-  MSSQL("mssql"),
-  MYSQL("mysql"),
   NEO4J("neo4j"),
   NEO4J_MIGRATIONS("neo4j-migrations"),
   OPENAPI_CONTRACT("openapi-contract"),
@@ -87,7 +88,6 @@ public enum JHLiteModuleSlug implements JHipsterModuleSlugFactory {
   PAGINATION_DOMAIN("pagination-domain"),
   PLAYWRIGHT_COMPONENT_TESTS("playwright-component-tests"),
   PLAYWRIGHT_E2E("playwright-e2e"),
-  POSTGRESQL("postgresql"),
   PRETTIER("prettier"),
   PROTOBUF("protobuf"),
   PROTOBUF_BACKWARDS_COMPATIBILITY_CHECK("protobuf-backwards-compatibility-check"),
diff --git a/src/main/resources/generator/server/springboot/database/mysql/DatabaseConfiguration.java.mustache b/src/main/resources/generator/server/springboot/database/jpa/DatabaseConfiguration.java.mustache
similarity index 84%
rename from src/main/resources/generator/server/springboot/database/mysql/DatabaseConfiguration.java.mustache
rename to src/main/resources/generator/server/springboot/database/jpa/DatabaseConfiguration.java.mustache
index cd2ffa737..584a526d0 100644
--- a/src/main/resources/generator/server/springboot/database/mysql/DatabaseConfiguration.java.mustache
+++ b/src/main/resources/generator/server/springboot/database/jpa/DatabaseConfiguration.java.mustache
@@ -1,4 +1,4 @@
-package {{packageName}}.wire.mysql.infrastructure.secondary;
+package {{packageName}}.wire.{{databaseType}}.infrastructure.secondary;
 
 import org.springframework.context.annotation.Configuration;
 import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
diff --git a/src/main/resources/generator/server/springboot/database/mssql/MsSQLTestContainerExtension.java.mustache b/src/main/resources/generator/server/springboot/database/jpa/MsSQLTestContainerExtension.java.mustache
similarity index 100%
rename from src/main/resources/generator/server/springboot/database/mssql/MsSQLTestContainerExtension.java.mustache
rename to src/main/resources/generator/server/springboot/database/jpa/MsSQLTestContainerExtension.java.mustache
diff --git a/src/main/resources/generator/server/springboot/database/mariadb/mariadb.md.mustache b/src/main/resources/generator/server/springboot/database/jpa/databaseType.md.mustache
similarity index 64%
rename from src/main/resources/generator/server/springboot/database/mariadb/mariadb.md.mustache
rename to src/main/resources/generator/server/springboot/database/jpa/databaseType.md.mustache
index c583c8598..ce5256a3a 100644
--- a/src/main/resources/generator/server/springboot/database/mariadb/mariadb.md.mustache
+++ b/src/main/resources/generator/server/springboot/database/jpa/databaseType.md.mustache
@@ -3,5 +3,5 @@
 Before you can start your project, you must launch the database with the following command
 
 ```bash
-docker compose -f {{srcMainDocker}}/mariadb.yml up -d
+docker compose -f {{srcMainDocker}}/{{databaseType}}.yml up -d
 ```
diff --git a/src/main/resources/generator/server/springboot/database/mssql/container-license-acceptance.txt.mustache b/src/main/resources/generator/server/springboot/database/jpa/docker/container-license-acceptance.txt.mustache
similarity index 100%
rename from src/main/resources/generator/server/springboot/database/mssql/container-license-acceptance.txt.mustache
rename to src/main/resources/generator/server/springboot/database/jpa/docker/container-license-acceptance.txt.mustache
diff --git a/src/main/resources/generator/server/springboot/database/mariadb/mariadb.yml.mustache b/src/main/resources/generator/server/springboot/database/jpa/docker/mariadb.yml.mustache
similarity index 100%
rename from src/main/resources/generator/server/springboot/database/mariadb/mariadb.yml.mustache
rename to src/main/resources/generator/server/springboot/database/jpa/docker/mariadb.yml.mustache
diff --git a/src/main/resources/generator/server/springboot/database/mssql/mssql.yml.mustache b/src/main/resources/generator/server/springboot/database/jpa/docker/mssql.yml.mustache
similarity index 100%
rename from src/main/resources/generator/server/springboot/database/mssql/mssql.yml.mustache
rename to src/main/resources/generator/server/springboot/database/jpa/docker/mssql.yml.mustache
diff --git a/src/main/resources/generator/server/springboot/database/mysql/mysql.yml.mustache b/src/main/resources/generator/server/springboot/database/jpa/docker/mysql.yml.mustache
similarity index 100%
rename from src/main/resources/generator/server/springboot/database/mysql/mysql.yml.mustache
rename to src/main/resources/generator/server/springboot/database/jpa/docker/mysql.yml.mustache
diff --git a/src/main/resources/generator/server/springboot/database/postgresql/postgresql.yml.mustache b/src/main/resources/generator/server/springboot/database/jpa/docker/postgresql.yml.mustache
similarity index 100%
rename from src/main/resources/generator/server/springboot/database/postgresql/postgresql.yml.mustache
rename to src/main/resources/generator/server/springboot/database/jpa/docker/postgresql.yml.mustache
diff --git a/src/main/resources/generator/server/springboot/database/mariadb/DatabaseConfiguration.java.mustache b/src/main/resources/generator/server/springboot/database/mariadb/DatabaseConfiguration.java.mustache
deleted file mode 100644
index 89d6fa4c8..000000000
--- a/src/main/resources/generator/server/springboot/database/mariadb/DatabaseConfiguration.java.mustache
+++ /dev/null
@@ -1,10 +0,0 @@
-package {{packageName}}.wire.mariadb.infrastructure.secondary;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
-
-@Configuration
-@EnableTransactionManagement
-@EnableJpaRepositories(basePackages = { "{{packageName}}" }, enableDefaultTransactions = false)
-class DatabaseConfiguration {}
diff --git a/src/main/resources/generator/server/springboot/database/mssql/DatabaseConfiguration.java.mustache b/src/main/resources/generator/server/springboot/database/mssql/DatabaseConfiguration.java.mustache
deleted file mode 100644
index c76d5f001..000000000
--- a/src/main/resources/generator/server/springboot/database/mssql/DatabaseConfiguration.java.mustache
+++ /dev/null
@@ -1,10 +0,0 @@
-package {{packageName}}.wire.mssql.infrastructure.secondary;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
-
-@Configuration
-@EnableTransactionManagement
-@EnableJpaRepositories(basePackages = { "{{packageName}}" }, enableDefaultTransactions = false)
-class DatabaseConfiguration {}
diff --git a/src/main/resources/generator/server/springboot/database/mssql/mssql.md.mustache b/src/main/resources/generator/server/springboot/database/mssql/mssql.md.mustache
deleted file mode 100644
index d3ea6276d..000000000
--- a/src/main/resources/generator/server/springboot/database/mssql/mssql.md.mustache
+++ /dev/null
@@ -1,7 +0,0 @@
-# Usage
-
-Before you can start your project, you must launch the database with the following command
-
-```bash
-docker compose -f {{srcMainDocker}}/mssql.yml up -d
-```
diff --git a/src/main/resources/generator/server/springboot/database/mysql/mysql.md.mustache b/src/main/resources/generator/server/springboot/database/mysql/mysql.md.mustache
deleted file mode 100644
index 70e07288d..000000000
--- a/src/main/resources/generator/server/springboot/database/mysql/mysql.md.mustache
+++ /dev/null
@@ -1,7 +0,0 @@
-# Usage
-
-Before you can start your project, you must launch the database with the following command
-
-```bash
-docker compose -f {{srcMainDocker}}/mysql.yml up -d
-```
diff --git a/src/main/resources/generator/server/springboot/database/postgresql/DatabaseConfiguration.java.mustache b/src/main/resources/generator/server/springboot/database/postgresql/DatabaseConfiguration.java.mustache
deleted file mode 100644
index dbbf0e5d5..000000000
--- a/src/main/resources/generator/server/springboot/database/postgresql/DatabaseConfiguration.java.mustache
+++ /dev/null
@@ -1,10 +0,0 @@
-package {{packageName}}.wire.postgresql.infrastructure.secondary;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
-
-@Configuration
-@EnableTransactionManagement
-@EnableJpaRepositories(basePackages = { "{{packageName}}" }, enableDefaultTransactions = false)
-class DatabaseConfiguration {}
diff --git a/src/main/resources/generator/server/springboot/database/postgresql/postgresql.md.mustache b/src/main/resources/generator/server/springboot/database/postgresql/postgresql.md.mustache
deleted file mode 100644
index 918fbe0fd..000000000
--- a/src/main/resources/generator/server/springboot/database/postgresql/postgresql.md.mustache
+++ /dev/null
@@ -1,7 +0,0 @@
-# Usage
-
-Before you can start your project, you must launch the database with the following command
-
-```bash
-docker compose -f {{srcMainDocker}}/postgresql.yml up -d
-```


Test patch:
diff --git a/src/test/features/server/springboot/database/mariadb.feature b/src/test/features/server/springboot/database/jpa-mariadb.feature
similarity index 90%
rename from src/test/features/server/springboot/database/mariadb.feature
rename to src/test/features/server/springboot/database/jpa-mariadb.feature
index cb8182126..457497aa3 100644
--- a/src/test/features/server/springboot/database/mariadb.feature
+++ b/src/test/features/server/springboot/database/jpa-mariadb.feature
@@ -1,10 +1,10 @@
-Feature: MariaDB module
+Feature: JPA MariaDB module
 
   Scenario: Should add MariaDB elements using legacy url
     When I apply modules to default project
       | maven-java  |
       | spring-boot |
-      | mariadb     |
+      | jpa-mariadb |
     Then I should have files in ""
       | pom.xml |
     And I should have files in "documentation"
@@ -19,7 +19,7 @@ Feature: MariaDB module
       | application-test.yml |
 
   Scenario: Should get MariaDB module properties definition
-    When I get module "mariadb" properties definition
+    When I get module "jpa-mariadb" properties definition
     Then I should have properties definitions
       | Key                       | Type    | Mandatory |
       | packageName               | STRING  | true      |
@@ -28,7 +28,7 @@ Feature: MariaDB module
       | springConfigurationFormat | STRING  | false     |
 
   Scenario: Should add MariaDB elements using module url
-    When I apply "mariadb" module to default project with maven file
+    When I apply "jpa-mariadb" module to default project with maven file
       | packageName | tech.jhipster.chips |
       | baseName    | jhipster            |
     Then I should have files in ""
diff --git a/src/test/features/server/springboot/database/mssql.feature b/src/test/features/server/springboot/database/jpa-mssql.feature
similarity index 92%
rename from src/test/features/server/springboot/database/mssql.feature
rename to src/test/features/server/springboot/database/jpa-mssql.feature
index 36a83e795..880f28c11 100644
--- a/src/test/features/server/springboot/database/mssql.feature
+++ b/src/test/features/server/springboot/database/jpa-mssql.feature
@@ -1,10 +1,10 @@
-Feature: mssql module
+Feature: JPA MsSql module
 
   Scenario: Should add MsSQL elements using legacy url
     When I apply modules to default project
       | maven-java  |
       | spring-boot |
-      | mssql       |
+      | jpa-mssql   |
     Then I should have files in ""
       | pom.xml |
     And I should have files in "documentation"
@@ -23,7 +23,7 @@ Feature: mssql module
       | application-test.yml |
 
   Scenario: Should get MsSQL module properties definition
-    When I get module "mssql" properties definition
+    When I get module "jpa-mssql" properties definition
     Then I should have properties definitions
       | Key                       | Type    | Mandatory |
       | packageName               | STRING  | true      |
diff --git a/src/test/features/server/springboot/database/mysql.feature b/src/test/features/server/springboot/database/jpa-mysql.feature
similarity index 90%
rename from src/test/features/server/springboot/database/mysql.feature
rename to src/test/features/server/springboot/database/jpa-mysql.feature
index 2094b5a5d..eeaa0064b 100644
--- a/src/test/features/server/springboot/database/mysql.feature
+++ b/src/test/features/server/springboot/database/jpa-mysql.feature
@@ -1,10 +1,10 @@
-Feature: MySQL module
+Feature: JPA MySQL module
 
   Scenario: Should add MySQL elements using legacy url
     When I apply modules to default project
       | maven-java  |
       | spring-boot |
-      | mysql       |
+      | jpa-mysql   |
     Then I should have files in ""
       | pom.xml |
     And I should have files in "documentation"
@@ -19,7 +19,7 @@ Feature: MySQL module
       | application-test.yml |
 
   Scenario: Should get MySQL module properties definition
-    When I get module "mysql" properties definition
+    When I get module "jpa-mysql" properties definition
     Then I should have properties definitions
       | Key                       | Type    | Mandatory |
       | packageName               | STRING  | true      |
@@ -28,7 +28,7 @@ Feature: MySQL module
       | springConfigurationFormat | STRING  | false     |
 
   Scenario: Should add MySQL elements using module url
-    When I apply "mysql" module to default project with maven file
+    When I apply "jpa-mysql" module to default project with maven file
       | packageName | tech.jhipster.chips |
       | baseName    | jhipster            |
     Then I should have files in ""
diff --git a/src/test/features/server/springboot/database/postgresql.feature b/src/test/features/server/springboot/database/jpa-postgresql.feature
similarity index 87%
rename from src/test/features/server/springboot/database/postgresql.feature
rename to src/test/features/server/springboot/database/jpa-postgresql.feature
index 77ed2ec51..320d55fda 100644
--- a/src/test/features/server/springboot/database/postgresql.feature
+++ b/src/test/features/server/springboot/database/jpa-postgresql.feature
@@ -1,10 +1,10 @@
-Feature: postgreSQL module
+Feature: JPA PostgreSQL module
 
   Scenario: Should add postgreSQL elements using legacy url
     When I apply modules to default project
-      | maven-java  |
-      | spring-boot |
-      | postgresql  |
+      | maven-java     |
+      | spring-boot    |
+      | jpa-postgresql |
     Then I should have files in ""
       | pom.xml |
     And I should have files in "documentation"
@@ -19,7 +19,7 @@ Feature: postgreSQL module
       | application-test.yml |
 
   Scenario: Should get postgreSQL module properties definition
-    When I get module "postgresql" properties definition
+    When I get module "jpa-postgresql" properties definition
     Then I should have properties definitions
       | Key                       | Type    | Mandatory |
       | packageName               | STRING  | true      |
@@ -28,7 +28,7 @@ Feature: postgreSQL module
       | springConfigurationFormat | STRING  | false     |
 
   Scenario: Should add postgreSQL elements using module url
-    When I apply "postgresql" module to default project with maven file
+    When I apply "jpa-postgresql" module to default project with maven file
       | packageName | tech.jhipster.chips |
       | baseName    | jhipster            |
     Then I should have files in ""
diff --git a/src/test/features/statistics.feature b/src/test/features/statistics.feature
index 63c1c4370..47ec079c8 100644
--- a/src/test/features/statistics.feature
+++ b/src/test/features/statistics.feature
@@ -11,7 +11,7 @@ Feature: application statistics
     Given I apply modules to default project
       | maven-java  |
       | spring-boot |
-      | mariadb     |
+      | jpa-mariadb |
     When I get statistics
     Then I should have statistics
       | Applied modules | 3 |
diff --git a/src/test/java/tech/jhipster/lite/generator/server/springboot/database/jpa/domain/JpaModuleFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/server/springboot/database/jpa/domain/JpaModuleFactoryTest.java
new file mode 100644
index 000000000..e4a2128b9
--- /dev/null
+++ b/src/test/java/tech/jhipster/lite/generator/server/springboot/database/jpa/domain/JpaModuleFactoryTest.java
@@ -0,0 +1,413 @@
+package tech.jhipster.lite.generator.server.springboot.database.jpa.domain;
+
+import static org.mockito.Mockito.when;
+import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.assertThatModuleWithFiles;
+import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.file;
+import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.pomFile;
+
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+import tech.jhipster.lite.TestFileUtils;
+import tech.jhipster.lite.UnitTest;
+import tech.jhipster.lite.module.domain.JHipsterModule;
+import tech.jhipster.lite.module.domain.JHipsterModulesFixture;
+import tech.jhipster.lite.module.domain.docker.DockerImageVersion;
+import tech.jhipster.lite.module.domain.docker.DockerImages;
+import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
+import tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions;
+
+@UnitTest
+@ExtendWith(MockitoExtension.class)
+class JpaModuleFactoryTest {
+
+  @Mock
+  private DockerImages dockerImages;
+
+  @InjectMocks
+  private JpaModuleFactory factory;
+
+  @Test
+  void shouldCreatePostgresqlModule() {
+    JHipsterModuleProperties properties = JHipsterModulesFixture.propertiesBuilder(TestFileUtils.tmpDirForTest())
+      .basePackage("tech.jhipster.jhlitest")
+      .projectBaseName("myapp")
+      .build();
+
+    when(dockerImages.get("postgres")).thenReturn(new DockerImageVersion("postgres", "0.0.0"));
+
+    JHipsterModule module = factory.buildPostgresql(properties);
+
+    assertThatModuleWithFiles(module, pomFile())
+      .hasFile("src/main/java/tech/jhipster/jhlitest/wire/postgresql/infrastructure/secondary/DatabaseConfiguration.java")
+      .containing("package tech.jhipster.jhlitest.wire.postgresql.infrastructure.secondary;")
+      .and()
+      .hasFile("documentation/postgresql.md")
+      .containing("docker compose -f src/main/docker/postgresql.yml up -d")
+      .and()
+      .hasFile("pom.xml")
+      .containing(
+        """
+            <dependency>
+              <groupId>org.postgresql</groupId>
+              <artifactId>postgresql</artifactId>
+              <scope>runtime</scope>
+            </dependency>
+        """
+      )
+      .containing("<groupId>com.zaxxer</groupId>")
+      .containing("<artifactId>HikariCP</artifactId>")
+      .containing("<groupId>org.hibernate.orm</groupId>")
+      .containing("<artifactId>hibernate-core</artifactId>")
+      .containing("<groupId>org.testcontainers</groupId>")
+      .and()
+      .hasFile("src/main/resources/config/application.yml")
+      .containing(
+        """
+        spring:
+          data:
+            jpa:
+              repositories:
+                bootstrap-mode: deferred
+          datasource:
+            driver-class-name: org.postgresql.Driver
+            hikari:
+              auto-commit: false
+              poolName: Hikari
+            password: ''
+            type: com.zaxxer.hikari.HikariDataSource
+            url: jdbc:postgresql://localhost:5432/myapp
+            username: myapp
+          jpa:
+            hibernate:
+              ddl-auto: none
+              naming:
+                implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
+                physical-strategy: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
+            open-in-view: false
+            properties:
+              hibernate:
+                connection:
+                  provider_disables_autocommit: true
+                generate_statistics: false
+                jdbc:
+                  batch_size: 25
+                  time_zone: UTC
+                order_inserts: true
+                order_updates: true
+                query:
+                  fail_on_pagination_over_collection_fetch: true
+                  in_clause_parameter_padding: true
+        """
+      )
+      .and()
+      .hasFile("src/test/resources/config/application-test.yml")
+      .containing(
+        """
+        spring:
+          datasource:
+            driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
+            hikari:
+              maximum-pool-size: 2
+            password: ''
+            url: jdbc:tc:postgresql:0.0.0:///myapp?TC_TMPFS=/testtmpfs:rw
+            username: myapp
+        """
+      );
+  }
+
+  @Test
+  void shouldCreateMariadbModule() {
+    JHipsterModuleProperties properties = JHipsterModulesFixture.propertiesBuilder(TestFileUtils.tmpDirForTest())
+      .basePackage("tech.jhipster.jhlitest")
+      .projectBaseName("myapp")
+      .build();
+
+    when(dockerImages.get("mariadb")).thenReturn(new DockerImageVersion("mariadb", "0.0.0"));
+
+    JHipsterModule module = factory.buildMariaDB(properties);
+
+    assertThatModuleWithFiles(module, pomFile())
+      .hasFile("documentation/mariadb.md")
+      .containing("docker compose -f src/main/docker/mariadb.yml up -d")
+      .and()
+      .hasFile("src/main/java/tech/jhipster/jhlitest/wire/mariadb/infrastructure/secondary/DatabaseConfiguration.java")
+      .containing("package tech.jhipster.jhlitest.wire.mariadb.infrastructure.secondary;")
+      .and()
+      .hasPrefixedFiles("src/main/docker", "mariadb.yml")
+      .hasFile("pom.xml")
+      .containing("<groupId>org.springframework.boot</groupId>")
+      .containing("<artifactId>spring-boot-starter-data-jpa</artifactId>")
+      .containing(
+        """
+            <dependency>
+              <groupId>org.mariadb.jdbc</groupId>
+              <artifactId>mariadb-java-client</artifactId>
+              <scope>runtime</scope>
+            </dependency>
+        """
+      )
+      .containing("<groupId>com.zaxxer</groupId>")
+      .containing("<artifactId>HikariCP</artifactId>")
+      .containing("<groupId>org.hibernate.orm</groupId>")
+      .containing("<artifactId>hibernate-core</artifactId>")
+      .containing("<groupId>org.testcontainers</groupId>")
+      .containing("<artifactId>mariadb</artifactId>")
+      .and()
+      .hasFile("src/main/resources/config/application.yml")
+      .containing(
+        """
+        spring:
+          data:
+            jpa:
+              repositories:
+                bootstrap-mode: deferred
+          datasource:
+            driver-class-name: org.mariadb.jdbc.Driver
+            hikari:
+              auto-commit: false
+              poolName: Hikari
+            password: ''
+            type: com.zaxxer.hikari.HikariDataSource
+            url: jdbc:mariadb://localhost:3306/myapp
+            username: root
+          jpa:
+            hibernate:
+              ddl-auto: none
+              naming:
+                implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
+                physical-strategy: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
+            open-in-view: false
+            properties:
+              hibernate:
+                connection:
+                  provider_disables_autocommit: true
+                generate_statistics: false
+                jdbc:
+                  batch_size: 25
+                  time_zone: UTC
+                order_inserts: true
+                order_updates: true
+                query:
+                  fail_on_pagination_over_collection_fetch: true
+                  in_clause_parameter_padding: true
+        """
+      )
+      .and()
+      .hasFile("src/test/resources/config/application-test.yml")
+      .containing(
+        """
+        spring:
+          datasource:
+            driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
+            hikari:
+              maximum-pool-size: 2
+            password: ''
+            url: jdbc:tc:mariadb:0.0.0:///myapp
+            username: myapp
+        """
+      );
+  }
+
+  @Test
+  void shouldCreateMysqlModule() {
+    JHipsterModuleProperties properties = JHipsterModulesFixture.propertiesBuilder(TestFileUtils.tmpDirForTest())
+      .basePackage("tech.jhipster.jhlitest")
+      .projectBaseName("myapp")
+      .build();
+
+    when(dockerImages.get("mysql")).thenReturn(new DockerImageVersion("mysql", "0.0.0"));
+
+    JHipsterModule module = factory.buildMySQL(properties);
+
+    assertThatModuleWithFiles(module, pomFile())
+      .hasFile("documentation/mysql.md")
+      .containing("docker compose -f src/main/docker/mysql.yml up -d")
+      .and()
+      .hasFile("src/main/java/tech/jhipster/jhlitest/wire/mysql/infrastructure/secondary/DatabaseConfiguration.java")
+      .containing("package tech.jhipster.jhlitest.wire.mysql.infrastructure.secondary;")
+      .and()
+      .hasPrefixedFiles("src/main/docker", "mysql.yml")
+      .hasFile("pom.xml")
+      .containing("<groupId>org.springframework.boot</groupId>")
+      .containing("<artifactId>spring-boot-starter-data-jpa</artifactId>")
+      .containing(
+        """
+            <dependency>
+              <groupId>com.mysql</groupId>
+              <artifactId>mysql-connector-j</artifactId>
+              <scope>runtime</scope>
+            </dependency>
+        """
+      )
+      .containing("<groupId>com.zaxxer</groupId>")
+      .containing("<artifactId>HikariCP</artifactId>")
+      .containing("<groupId>org.hibernate.orm</groupId>")
+      .containing("<artifactId>hibernate-core</artifactId>")
+      .containing("<groupId>org.testcontainers</groupId>")
+      .containing("<artifactId>mysql</artifactId>")
+      .and()
+      .hasFile("src/main/resources/config/application.yml")
+      .containing(
+        // language=yaml
+        """
+        spring:
+          data:
+            jpa:
+              repositories:
+                bootstrap-mode: deferred
+          datasource:
+            driver-class-name: com.mysql.cj.jdbc.Driver
+            hikari:
+              auto-commit: false
+              poolName: Hikari
+            password: ''
+            type: com.zaxxer.hikari.HikariDataSource
+            url: jdbc:mysql://localhost:3306/myapp
+            username: root
+          jpa:
+            hibernate:
+              ddl-auto: none
+              naming:
+                implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
+                physical-strategy: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
+            open-in-view: false
+            properties:
+              hibernate:
+                connection:
+                  provider_disables_autocommit: true
+                generate_statistics: false
+                jdbc:
+                  batch_size: 25
+                  time_zone: UTC
+                order_inserts: true
+                order_updates: true
+                query:
+                  fail_on_pagination_over_collection_fetch: true
+                  in_clause_parameter_padding: true
+        """
+      )
+      .and()
+      .hasFile("src/test/resources/config/application-test.yml")
+      .containing(
+        // language=yaml
+        """
+        spring:
+          datasource:
+            driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
+            hikari:
+              maximum-pool-size: 2
+            password: ''
+            url: jdbc:tc:mysql:0.0.0:///myapp
+            username: myapp
+        """
+      );
+  }
+
+  @Test
+  void shouldCreateMssqlModule() {
+    JHipsterModuleProperties properties = JHipsterModulesFixture.propertiesBuilder(TestFileUtils.tmpDirForTest())
+      .basePackage("tech.jhipster.jhlitest")
+      .projectBaseName("myapp")
+      .build();
+
+    when(dockerImages.get("mcr.microsoft.com/mssql/server")).thenReturn(new DockerImageVersion("mcr.microsoft.com/mssql/server", "0.0.0"));
+
+    JHipsterModule module = factory.buildMsSQL(properties);
+
+    assertThatModuleWithFiles(module, pomFile(), integrationTestAnnotation())
+      .hasFile("src/main/java/tech/jhipster/jhlitest/wire/mssql/infrastructure/secondary/DatabaseConfiguration.java")
+      .containing("package tech.jhipster.jhlitest.wire.mssql.infrastructure.secondary;")
+      .and()
+      .hasFile("documentation/mssql.md")
+      .containing("docker compose -f src/main/docker/mssql.yml up -d")
+      .and()
+      .hasFile("src/test/java/tech/jhipster/jhlitest/MsSQLTestContainerExtension.java")
+      .and()
+      .hasFile("src/test/resources/container-license-acceptance.txt")
+      .and()
+      .hasFile("pom.xml")
+      .containing(
+        """
+            <dependency>
+              <groupId>com.microsoft.sqlserver</groupId>
+              <artifactId>mssql-jdbc</artifactId>
+              <scope>runtime</scope>
+            </dependency>
+        """
+      )
+      .containing("<groupId>com.zaxxer</groupId>")
+      .containing("<artifactId>HikariCP</artifactId>")
+      .containing("<groupId>org.hibernate.orm</groupId>")
+      .containing("<artifactId>hibernate-core</artifactId>")
+      .containing("<groupId>org.testcontainers</groupId>")
+      .containing("<artifactId>mssqlserver</artifactId>")
+      .and()
+      .hasFile("src/main/resources/config/application.yml")
+      .containing(
+        // language=yaml
+        """
+        spring:
+          data:
+            jpa:
+              repositories:
+                bootstrap-mode: deferred
+          datasource:
+            driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+            hikari:
+              auto-commit: false
+              poolName: Hikari
+            password: yourStrong(!)Password
+            type: com.zaxxer.hikari.HikariDataSource
+            url: jdbc:sqlserver://localhost:1433;database=myapp;trustServerCertificate=true
+            username: SA
+          jpa:
+            hibernate:
+              ddl-auto: update
+              naming:
+                implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
+                physical-strategy: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
+            open-in-view: false
+            properties:
+              hibernate:
+                connection:
+                  provider_disables_autocommit: true
+                criteria:
+                  literal_handling_mode: BIND
+                dialect: org.hibernate.dialect.SQLServer2012Dialect
+                format_sql: true
+                generate_statistics: false
+                jdbc:
+                  batch_size: 25
+                  fetch_size: 150
+                  time_zone: UTC
+                order_inserts: true
+                order_updates: true
+                query:
+                  fail_on_pagination_over_collection_fetch: true
+                  in_clause_parameter_padding: true
+        """
+      )
+      .and()
+      .hasFile("src/test/resources/config/application-test.yml")
+      .containing(
+        // language=yaml
+        """
+        spring:
+          datasource:
+            driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
+            hikari:
+              maximum-pool-size: 2
+            password: yourStrong(!)Password
+            url: jdbc:tc:sqlserver:///;database=myapp;trustServerCertificate=true?TC_TMPFS=/testtmpfs:rw
+            username: SA
+        """
+      );
+  }
+
+  private JHipsterModulesAssertions.ModuleFile integrationTestAnnotation() {
+    return file("src/test/resources/projects/files/IntegrationTest.java", "src/test/java/tech/jhipster/jhlitest/IntegrationTest.java");
+  }
+}
diff --git a/src/test/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/domain/MariaDBModuleFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/domain/MariaDBModuleFactoryTest.java
deleted file mode 100644
index 2fbb8cf3c..000000000
--- a/src/test/java/tech/jhipster/lite/generator/server/springboot/database/mariadb/domain/MariaDBModuleFactoryTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.mariadb.domain;
-
-import static org.mockito.Mockito.when;
-import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.assertThatModuleWithFiles;
-import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.pomFile;
-
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.junit.jupiter.MockitoExtension;
-import tech.jhipster.lite.TestFileUtils;
-import tech.jhipster.lite.UnitTest;
-import tech.jhipster.lite.module.domain.JHipsterModule;
-import tech.jhipster.lite.module.domain.JHipsterModulesFixture;
-import tech.jhipster.lite.module.domain.docker.DockerImageVersion;
-import tech.jhipster.lite.module.domain.docker.DockerImages;
-import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
-
-@UnitTest
-@ExtendWith(MockitoExtension.class)
-class MariaDBModuleFactoryTest {
-
-  @Mock
-  private DockerImages dockerImages;
-
-  @InjectMocks
-  private MariaDBModuleFactory factory;
-
-  @Test
-  void shouldCreateModule() {
-    JHipsterModuleProperties properties = JHipsterModulesFixture.propertiesBuilder(TestFileUtils.tmpDirForTest())
-      .basePackage("tech.jhipster.jhlitest")
-      .projectBaseName("myapp")
-      .build();
-
-    when(dockerImages.get("mariadb")).thenReturn(new DockerImageVersion("mariadb", "0.0.0"));
-
-    JHipsterModule module = factory.buildModule(properties);
-
-    assertThatModuleWithFiles(module, pomFile())
-      .hasFile("documentation/mariadb.md")
-      .and()
-      .hasPrefixedFiles("src/main/java/tech/jhipster/jhlitest/wire/mariadb/infrastructure/secondary", "DatabaseConfiguration.java")
-      .hasPrefixedFiles("src/main/docker", "mariadb.yml")
-      .hasFile("pom.xml")
-      .containing("<groupId>org.springframework.boot</groupId>")
-      .containing("<artifactId>spring-boot-starter-data-jpa</artifactId>")
-      .containing(
-        """
-            <dependency>
-              <groupId>org.mariadb.jdbc</groupId>
-              <artifactId>mariadb-java-client</artifactId>
-              <scope>runtime</scope>
-            </dependency>
-        """
-      )
-      .containing("<groupId>com.zaxxer</groupId>")
-      .containing("<artifactId>HikariCP</artifactId>")
-      .containing("<groupId>org.hibernate.orm</groupId>")
-      .containing("<artifactId>hibernate-core</artifactId>")
-      .containing("<groupId>org.testcontainers</groupId>")
-      .containing("<artifactId>mariadb</artifactId>")
-      .and()
-      .hasFile("src/main/resources/config/application.yml")
-      .containing(
-        """
-        spring:
-          data:
-            jpa:
-              repositories:
-                bootstrap-mode: deferred
-          datasource:
-            driver-class-name: org.mariadb.jdbc.Driver
-            hikari:
-              auto-commit: false
-              poolName: Hikari
-            password: ''
-            type: com.zaxxer.hikari.HikariDataSource
-            url: jdbc:mariadb://localhost:3306/myapp
-            username: root
-          jpa:
-            hibernate:
-              ddl-auto: none
-              naming:
-                implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
-                physical-strategy: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
-            open-in-view: false
-            properties:
-              hibernate:
-                connection:
-                  provider_disables_autocommit: true
-                generate_statistics: false
-                jdbc:
-                  batch_size: 25
-                  time_zone: UTC
-                order_inserts: true
-                order_updates: true
-                query:
-                  fail_on_pagination_over_collection_fetch: true
-                  in_clause_parameter_padding: true
-        """
-      )
-      .and()
-      .hasFile("src/test/resources/config/application-test.yml")
-      .containing(
-        """
-        spring:
-          datasource:
-            driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
-            hikari:
-              maximum-pool-size: 2
-            password: ''
-            url: jdbc:tc:mariadb:0.0.0:///myapp
-            username: myapp
-        """
-      );
-  }
-}
diff --git a/src/test/java/tech/jhipster/lite/generator/server/springboot/database/mssql/domain/MsSQLModuleFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/server/springboot/database/mssql/domain/MsSQLModuleFactoryTest.java
deleted file mode 100644
index 2f9c60979..000000000
--- a/src/test/java/tech/jhipster/lite/generator/server/springboot/database/mssql/domain/MsSQLModuleFactoryTest.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.mssql.domain;
-
-import static org.mockito.Mockito.when;
-import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.*;
-
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.junit.jupiter.MockitoExtension;
-import tech.jhipster.lite.TestFileUtils;
-import tech.jhipster.lite.UnitTest;
-import tech.jhipster.lite.module.domain.JHipsterModule;
-import tech.jhipster.lite.module.domain.JHipsterModulesFixture;
-import tech.jhipster.lite.module.domain.docker.DockerImageVersion;
-import tech.jhipster.lite.module.domain.docker.DockerImages;
-import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
-
-@UnitTest
-@ExtendWith(MockitoExtension.class)
-class MsSQLModuleFactoryTest {
-
-  @Mock
-  private DockerImages dockerImages;
-
-  @InjectMocks
-  private MsSQLModuleFactory factory;
-
-  @Test
-  void shouldCreateModule() {
-    JHipsterModuleProperties properties = JHipsterModulesFixture.propertiesBuilder(TestFileUtils.tmpDirForTest())
-      .basePackage("tech.jhipster.jhlitest")
-      .projectBaseName("myapp")
-      .build();
-
-    when(dockerImages.get("mcr.microsoft.com/mssql/server")).thenReturn(new DockerImageVersion("mcr.microsoft.com/mssql/server", "0.0.0"));
-
-    JHipsterModule module = factory.buildModule(properties);
-
-    assertThatModuleWithFiles(module, pomFile(), integrationTestAnnotation())
-      .hasFile("src/main/java/tech/jhipster/jhlitest/wire/mssql/infrastructure/secondary/DatabaseConfiguration.java")
-      .and()
-      .hasFile("documentation/mssql.md")
-      .and()
-      .hasFile("src/test/java/tech/jhipster/jhlitest/MsSQLTestContainerExtension.java")
-      .and()
-      .hasFile("src/test/resources/container-license-acceptance.txt")
-      .and()
-      .hasFile("pom.xml")
-      .containing(
-        """
-            <dependency>
-              <groupId>com.microsoft.sqlserver</groupId>
-              <artifactId>mssql-jdbc</artifactId>
-              <scope>runtime</scope>
-            </dependency>
-        """
-      )
-      .containing("<groupId>com.zaxxer</groupId>")
-      .containing("<artifactId>HikariCP</artifactId>")
-      .containing("<groupId>org.hibernate.orm</groupId>")
-      .containing("<artifactId>hibernate-core</artifactId>")
-      .containing("<groupId>org.testcontainers</groupId>")
-      .containing("<artifactId>mssqlserver</artifactId>")
-      .and()
-      .hasFile("src/main/resources/config/application.yml")
-      .containing(
-        // language=yaml
-        """
-        spring:
-          data:
-            jpa:
-              repositories:
-                bootstrap-mode: deferred
-          datasource:
-            driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-            hikari:
-              auto-commit: false
-              poolName: Hikari
-            password: yourStrong(!)Password
-            type: com.zaxxer.hikari.HikariDataSource
-            url: jdbc:sqlserver://localhost:1433;database=myapp;trustServerCertificate=true
-            username: SA
-          jpa:
-            hibernate:
-              ddl-auto: update
-              naming:
-                implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
-                physical-strategy: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
-            open-in-view: false
-            properties:
-              hibernate:
-                connection:
-                  provider_disables_autocommit: true
-                criteria:
-                  literal_handling_mode: BIND
-                dialect: org.hibernate.dialect.SQLServer2012Dialect
-                format_sql: true
-                generate_statistics: false
-                jdbc:
-                  batch_size: 25
-                  fetch_size: 150
-                  time_zone: UTC
-                order_inserts: true
-                order_updates: true
-                query:
-                  fail_on_pagination_over_collection_fetch: true
-                  in_clause_parameter_padding: true
-        """
-      )
-      .and()
-      .hasFile("src/test/resources/config/application-test.yml")
-      .containing(
-        // language=yaml
-        """
-        spring:
-          datasource:
-            driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
-            hikari:
-              maximum-pool-size: 2
-            password: yourStrong(!)Password
-            url: jdbc:tc:sqlserver:///;database=myapp;trustServerCertificate=true?TC_TMPFS=/testtmpfs:rw
-            username: SA
-        """
-      );
-  }
-
-  private ModuleFile integrationTestAnnotation() {
-    return file("src/test/resources/projects/files/IntegrationTest.java", "src/test/java/tech/jhipster/jhlitest/IntegrationTest.java");
-  }
-}
diff --git a/src/test/java/tech/jhipster/lite/generator/server/springboot/database/mysql/domain/MySQLModuleFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/server/springboot/database/mysql/domain/MySQLModuleFactoryTest.java
deleted file mode 100644
index aad47c768..000000000
--- a/src/test/java/tech/jhipster/lite/generator/server/springboot/database/mysql/domain/MySQLModuleFactoryTest.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.mysql.domain;
-
-import static org.mockito.Mockito.when;
-import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.assertThatModuleWithFiles;
-import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.pomFile;
-
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.junit.jupiter.MockitoExtension;
-import tech.jhipster.lite.TestFileUtils;
-import tech.jhipster.lite.UnitTest;
-import tech.jhipster.lite.module.domain.JHipsterModule;
-import tech.jhipster.lite.module.domain.JHipsterModulesFixture;
-import tech.jhipster.lite.module.domain.docker.DockerImageVersion;
-import tech.jhipster.lite.module.domain.docker.DockerImages;
-import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
-
-@UnitTest
-@ExtendWith(MockitoExtension.class)
-class MySQLModuleFactoryTest {
-
-  @Mock
-  private DockerImages dockerImages;
-
-  @InjectMocks
-  private MySQLModuleFactory factory;
-
-  @Test
-  void shouldCreateModule() {
-    JHipsterModuleProperties properties = JHipsterModulesFixture.propertiesBuilder(TestFileUtils.tmpDirForTest())
-      .basePackage("tech.jhipster.jhlitest")
-      .projectBaseName("myapp")
-      .build();
-
-    when(dockerImages.get("mysql")).thenReturn(new DockerImageVersion("mysql", "0.0.0"));
-
-    JHipsterModule module = factory.buildModule(properties);
-
-    assertThatModuleWithFiles(module, pomFile())
-      .hasFile("documentation/mysql.md")
-      .and()
-      .hasPrefixedFiles("src/main/java/tech/jhipster/jhlitest/wire/mysql/infrastructure/secondary", "DatabaseConfiguration.java")
-      .hasPrefixedFiles("src/main/docker", "mysql.yml")
-      .hasFile("pom.xml")
-      .containing("<groupId>org.springframework.boot</groupId>")
-      .containing("<artifactId>spring-boot-starter-data-jpa</artifactId>")
-      .containing(
-        """
-            <dependency>
-              <groupId>com.mysql</groupId>
-              <artifactId>mysql-connector-j</artifactId>
-              <scope>runtime</scope>
-            </dependency>
-        """
-      )
-      .containing("<groupId>com.zaxxer</groupId>")
-      .containing("<artifactId>HikariCP</artifactId>")
-      .containing("<groupId>org.hibernate.orm</groupId>")
-      .containing("<artifactId>hibernate-core</artifactId>")
-      .containing("<groupId>org.testcontainers</groupId>")
-      .containing("<artifactId>mysql</artifactId>")
-      .and()
-      .hasFile("src/main/resources/config/application.yml")
-      .containing(
-        // language=yaml
-        """
-        spring:
-          data:
-            jpa:
-              repositories:
-                bootstrap-mode: deferred
-          datasource:
-            driver-class-name: com.mysql.cj.jdbc.Driver
-            hikari:
-              auto-commit: false
-              poolName: Hikari
-            password: ''
-            type: com.zaxxer.hikari.HikariDataSource
-            url: jdbc:mysql://localhost:3306/myapp
-            username: root
-          jpa:
-            hibernate:
-              ddl-auto: none
-              naming:
-                implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
-                physical-strategy: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
-            open-in-view: false
-            properties:
-              hibernate:
-                connection:
-                  provider_disables_autocommit: true
-                generate_statistics: false
-                jdbc:
-                  batch_size: 25
-                  time_zone: UTC
-                order_inserts: true
-                order_updates: true
-                query:
-                  fail_on_pagination_over_collection_fetch: true
-                  in_clause_parameter_padding: true
-        """
-      )
-      .and()
-      .hasFile("src/test/resources/config/application-test.yml")
-      .containing(
-        // language=yaml
-        """
-        spring:
-          datasource:
-            driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
-            hikari:
-              maximum-pool-size: 2
-            password: ''
-            url: jdbc:tc:mysql:0.0.0:///myapp
-            username: myapp
-        """
-      );
-  }
-}
diff --git a/src/test/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/domain/PostgresqlModuleFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/domain/PostgresqlModuleFactoryTest.java
deleted file mode 100644
index 05c04d5ef..000000000
--- a/src/test/java/tech/jhipster/lite/generator/server/springboot/database/postgresql/domain/PostgresqlModuleFactoryTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package tech.jhipster.lite.generator.server.springboot.database.postgresql.domain;
-
-import static org.mockito.Mockito.when;
-import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.assertThatModuleWithFiles;
-import static tech.jhipster.lite.module.infrastructure.secondary.JHipsterModulesAssertions.pomFile;
-
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.junit.jupiter.MockitoExtension;
-import tech.jhipster.lite.TestFileUtils;
-import tech.jhipster.lite.UnitTest;
-import tech.jhipster.lite.module.domain.JHipsterModule;
-import tech.jhipster.lite.module.domain.JHipsterModulesFixture;
-import tech.jhipster.lite.module.domain.docker.DockerImageVersion;
-import tech.jhipster.lite.module.domain.docker.DockerImages;
-import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties;
-
-@UnitTest
-@ExtendWith(MockitoExtension.class)
-class PostgresqlModuleFactoryTest {
-
-  @Mock
-  private DockerImages dockerImages;
-
-  @InjectMocks
-  private PostgresqlModuleFactory factory;
-
-  @Test
-  void shouldCreateModule() {
-    JHipsterModuleProperties properties = JHipsterModulesFixture.propertiesBuilder(TestFileUtils.tmpDirForTest())
-      .basePackage("tech.jhipster.jhlitest")
-      .projectBaseName("myapp")
-      .build();
-
-    when(dockerImages.get("postgres")).thenReturn(new DockerImageVersion("postgres", "0.0.0"));
-
-    JHipsterModule module = factory.buildModule(properties);
-
-    assertThatModuleWithFiles(module, pomFile())
-      .hasPrefixedFiles("src/main/java/tech/jhipster/jhlitest/wire/postgresql/infrastructure/secondary", "DatabaseConfiguration.java")
-      .hasFile("documentation/postgresql.md")
-      .and()
-      .hasFile("pom.xml")
-      .containing(
-        """
-            <dependency>
-              <groupId>org.postgresql</groupId>
-              <artifactId>postgresql</artifactId>
-              <scope>runtime</scope>
-            </dependency>
-        """
-      )
-      .containing("<groupId>com.zaxxer</groupId>")
-      .containing("<artifactId>HikariCP</artifactId>")
-      .containing("<groupId>org.hibernate.orm</groupId>")
-      .containing("<artifactId>hibernate-core</artifactId>")
-      .containing("<groupId>org.testcontainers</groupId>")
-      .and()
-      .hasFile("src/main/resources/config/application.yml")
-      .containing(
-        """
-        spring:
-          data:
-            jpa:
-              repositories:
-                bootstrap-mode: deferred
-          datasource:
-            driver-class-name: org.postgresql.Driver
-            hikari:
-              auto-commit: false
-              poolName: Hikari
-            password: ''
-            type: com.zaxxer.hikari.HikariDataSource
-            url: jdbc:postgresql://localhost:5432/myapp
-            username: myapp
-          jpa:
-            hibernate:
-              ddl-auto: none
-              naming:
-                implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
-                physical-strategy: org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
-            open-in-view: false
-            properties:
-              hibernate:
-                connection:
-                  provider_disables_autocommit: true
-                generate_statistics: false
-                jdbc:
-                  batch_size: 25
-                  time_zone: UTC
-                order_inserts: true
-                order_updates: true
-                query:
-                  fail_on_pagination_over_collection_fetch: true
-                  in_clause_parameter_padding: true
-        """
-      )
-      .and()
-      .hasFile("src/test/resources/config/application-test.yml")
-      .containing(
-        """
-        spring:
-          datasource:
-            driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver
-            hikari:
-              maximum-pool-size: 2
-            password: ''
-            url: jdbc:tc:postgresql:0.0.0:///myapp?TC_TMPFS=/testtmpfs:rw
-            username: myapp
-        """
-      );
-  }
-}
diff --git a/tests-ci/generate.sh b/tests-ci/generate.sh
index a251c4414..94d8b732c 100755
--- a/tests-ci/generate.sh
+++ b/tests-ci/generate.sh
@@ -164,7 +164,7 @@ elif [[ $application == 'fullapp' ]]; then
   applyModules "spring-boot-cucumber-jpa-reset"
   applyModules "application-service-hexagonal-architecture-documentation"
 
-  applyModules "postgresql" "liquibase" "liquibase-async"
+  applyModules "jpa-postgresql" "liquibase" "liquibase-async"
 
   applyModules \
     "kipe-expression" \
@@ -212,7 +212,7 @@ elif [[ $application == 'mysqlapp' ]]; then
   spring_boot_mvc
   sonar_back
 
-  applyModules "mysql" "liquibase"
+  applyModules "jpa-mysql" "liquibase"
 
   cucumber_with_jwt
 
@@ -234,7 +234,7 @@ elif [[ $application == 'mariadbapp' ]]; then
   sonar_back
 
   applyModules "springdoc-mvc-openapi"
-  applyModules "mariadb" "liquibase"
+  applyModules "jpa-mariadb" "liquibase"
   applyModules "ehcache-xml-config"
 
 elif [[ $application == 'mssqlapp' ]]; then
@@ -243,14 +243,14 @@ elif [[ $application == 'mssqlapp' ]]; then
   sonar_back
 
   applyModules "springdoc-mvc-openapi"
-  applyModules "mssql"
+  applyModules "jpa-mssql"
 
 elif [[ $application == 'flywayapp' ]]; then
   init_server
   spring_boot_mvc
   sonar_back
 
-  applyModules "postgresql" "flyway" "flyway-postgresql"
+  applyModules "jpa-postgresql" "flyway" "flyway-postgresql"
 
   cucumber_with_jwt
 
@@ -269,7 +269,7 @@ elif [[ $application == 'undertowapp' ]]; then
   sonar_back
 
   applyModules \
-    "mysql" \
+    "jpa-mysql" \
     "flyway" \
     "flyway-mysql"