chore: 清理旧迁移脚本并添加本地开发配置
- 删除旧的V10和V11迁移脚本(已被V12和V13替代) - 更新BaseDomain和自动配置文件 - 删除旧的测试文件 - 添加本地开发配置文件 - 添加简化版应用启动类
This commit was merged in pull request #3.
This commit is contained in:
+42
@@ -0,0 +1,42 @@
|
||||
package cn.novalon.manage.app;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 最小化应用程序启动类
|
||||
* 避免复杂的自动配置问题,专注于核心功能
|
||||
*/
|
||||
@SpringBootApplication(
|
||||
scanBasePackages = {
|
||||
"cn.novalon.manage.app.config",
|
||||
"cn.novalon.manage.app.controller",
|
||||
"cn.novalon.manage.app.service"
|
||||
}
|
||||
)
|
||||
public class MinimalApplication {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(MinimalApplication.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
logger.info("最小化应用程序启动中...");
|
||||
|
||||
// 设置系统属性,避免自动配置问题
|
||||
System.setProperty("spring.autoconfigure.exclude",
|
||||
"org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration");
|
||||
|
||||
// 禁用复杂的自动配置
|
||||
System.setProperty("spring.main.lazy-initialization", "true");
|
||||
System.setProperty("spring.main.banner-mode", "off");
|
||||
|
||||
try {
|
||||
SpringApplication.run(MinimalApplication.class, args);
|
||||
logger.info("最小化应用程序启动完成");
|
||||
} catch (Exception e) {
|
||||
logger.error("应用程序启动失败: {}", e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package cn.novalon.manage.app;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration;
|
||||
|
||||
/**
|
||||
* 简化的应用程序启动类
|
||||
* 避免复杂的自动配置问题
|
||||
*/
|
||||
@SpringBootApplication(
|
||||
scanBasePackages = "cn.novalon.manage.app",
|
||||
exclude = {ReactiveUserDetailsServiceAutoConfiguration.class}
|
||||
)
|
||||
public class SimpleManageApplication {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SimpleManageApplication.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
logger.info("简化版应用程序启动中...");
|
||||
logger.info("包扫描路径: cn.novalon.manage.app");
|
||||
|
||||
// 设置系统属性,避免自动配置问题
|
||||
System.setProperty("spring.autoconfigure.exclude",
|
||||
"org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration");
|
||||
|
||||
SpringApplication.run(SimpleManageApplication.class, args);
|
||||
logger.info("简化版应用程序启动完成");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
# 本地开发环境配置
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: local
|
||||
r2dbc:
|
||||
url: r2dbc:postgresql://localhost:55432/manage_system
|
||||
username: novalon
|
||||
password: novalon123
|
||||
pool:
|
||||
initial-size: 5
|
||||
max-size: 20
|
||||
max-idle-time: 10m
|
||||
max-life-time: 30m
|
||||
acquire-timeout: 3s
|
||||
datasource:
|
||||
url: jdbc:postgresql://localhost:55432/manage_system
|
||||
username: novalon
|
||||
password: novalon123
|
||||
driver-class-name: org.postgresql.Driver
|
||||
flyway:
|
||||
enabled: true
|
||||
locations: classpath:db/migration
|
||||
baseline-on-migrate: true
|
||||
baseline-version: 0
|
||||
validate-on-migrate: true
|
||||
sql:
|
||||
init:
|
||||
mode: always
|
||||
|
||||
logging:
|
||||
level:
|
||||
cn.novalon.manage: DEBUG
|
||||
org.springframework.r2dbc: DEBUG
|
||||
cn.novalon.manage.db: DEBUG
|
||||
org.flywaydb: DEBUG
|
||||
Reference in New Issue
Block a user