This commit is contained in:
EightMonth
2023-11-23 13:50:07 +08:00
parent 2e34683076
commit d19d7d6a5d
3 changed files with 31 additions and 24 deletions

View File

@ -36,6 +36,9 @@ public class JeecgSentinelApplication {
triggerSentinelInit();
ConfigurableApplicationContext application = SpringApplication.run(JeecgSentinelApplication.class, args);
Environment env = application.getEnvironment();
// 目前jeecg-sentinel 1.8.3 版本存在alibaba-sentinel 1.8.3版本 启动nacos数据源导致配置不生效的问题以下为临时处理办法
System.getProperties().setProperty("sentinel.dashboard.auth.username", env.getProperty("sentinel.dashboard.auth.username"));
System.getProperties().setProperty("sentinel.dashboard.auth.password", env.getProperty("sentinel.dashboard.auth.password"));
String port = env.getProperty("server.port");
log.info("\n----------------------------------------------------------\n\t" +
"Application SentinelDashboard is running! Access URLs:\n\t" +

View File

@ -18,8 +18,6 @@ auth:
filter:
exclude-url-suffixes: htm,html,js,css,map,ico,ttf,woff,png
exclude-urls: /,/auth/login,/auth/logout,/registry/machine,/version
password: sentinel
username: sentinel
logging:
level:
org:
@ -34,4 +32,7 @@ nacos:
ip: @config.server-addr@
sentinel:
dashboard:
version: 1.8.2
version: 1.8.2
auth:
username: sentinel
password: sentinel