fix(仪表板): 修复默认数据源不兼容外部指定数据源问题

This commit is contained in:
wangjiahao 2024-05-10 11:31:24 +08:00
parent c68228f2d2
commit 23a0b49917

View File

@ -158,6 +158,7 @@ public class EngineManage {
public void initLocalDataSource(){
QueryWrapper<CoreDatasource> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("id",985188400292302848L);
queryWrapper.ne("create_time",1715053684176L);
if(!datasourceMapper.exists(queryWrapper) && !ModelUtils.isDesktop()){
Pattern WITH_SQL_FRAGMENT = Pattern.compile("jdbc:mysql://(.*):(\\d+)/(.*)\\?(.*)");
Matcher matcher = WITH_SQL_FRAGMENT.matcher(env.getProperty("spring.datasource.url"));