mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 01:28:24 +08:00
mybatis-flex-solon-plugin:mybatisFlex 配置的数据源,增加同步到应用上下文的处理
This commit is contained in:
parent
7c942cb3cc
commit
7e48db05d7
@ -87,7 +87,11 @@ public class XPluginImpl implements Plugin {
|
||||
String dsName = entry.getKey();
|
||||
DataSource ds = new DataSourceBuilder(entry.getValue()).build();
|
||||
BeanWrap bw = context.wrap(dsName, ds, dsName.equals(flexProperties.getDefaultDatasourceKey()));
|
||||
loadDs(context, bw);
|
||||
context.putWrap(dsName, bw);
|
||||
if (bw.typed()) {
|
||||
context.putWrap(DataSource.class, bw);
|
||||
}
|
||||
context.wrapPublish(bw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user