mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-06 16:48:24 +08:00
feat: 指定生成实体类的数据源。
This commit is contained in:
parent
0cceda2607
commit
b72fbfddb6
@ -223,6 +223,12 @@ public class Table {
|
||||
tableAnnotation.append(", schema = \"").append(globalSchema).append("\"");
|
||||
}
|
||||
|
||||
// 添加 dataSource 配置,因为代码生成器是一个数据源生成的,所以这些实体类应该都是一个数据源。
|
||||
String dataSource = globalConfig.getEntityDataSource();
|
||||
if (StringUtil.isNotBlank(dataSource)) {
|
||||
tableAnnotation.append(", dataSource = \"").append(dataSource).append("\"");
|
||||
}
|
||||
|
||||
if (tableConfig != null) {
|
||||
if (StringUtil.isNotBlank(tableConfig.getSchema())) {
|
||||
tableAnnotation.append(", schema = \"").append(tableConfig.getSchema()).append("\"");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user