资源相关

This commit is contained in:
ZZX9599
2025-09-16 17:41:23 +08:00
parent 89df7e6c0e
commit adf375648b
22 changed files with 350 additions and 16 deletions

View File

@ -61,7 +61,6 @@ public class DatabaseManager {
log.info("{}数据库已初始化、无需重复执行", dbType.name());
return;
}
try {
loadConfig(dbType);
if (!validateConfig(dbType)) {
@ -189,6 +188,10 @@ public class DatabaseManager {
}
}
public static void createTablesForEntities(DatabaseType dbType, Class entityClass, Connection connection) throws SQLException {
createTableIfNotExists(connection, dbType, entityClass);
}
private static void createTableIfNotExists(Connection connection, DatabaseType dbType, Class<?> entityClass) throws SQLException {
String tableName = getUnderlineName(entityClass.getSimpleName());

View File

@ -9,7 +9,7 @@ import javax.sql.DataSource;
@Configuration
public class JdbcTemplateConfig {
/**
* 配置JdbcTemplate
* 配置 JdbcTemplate
*/
@Bean
public JdbcTemplate jdbcTemplate(DataSource dataSource) {