Skip to content

Commit 2446a75

Browse files
author
hewei
committed
修正首字母大写问题
1 parent aec6fc2 commit 2446a75

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/itfsw/mybatis/generator/plugins/TableRenameConfigurationPlugin.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,10 @@ public void tableConfiguration(IntrospectedTable introspectedTable) {
125125
}
126126
// TODO 官方bug临时修复
127127
if (tableConfiguration.getDomainObjectRenamingRule() != null) {
128-
String domainObjectName = fullyQualifiedTable.getDomainObjectName();
128+
StringBuilder domainObjectName = new StringBuilder(fullyQualifiedTable.getDomainObjectName());
129129
// 首字母大写
130-
BeanUtils.setProperty(fullyQualifiedTable, "domainObjectName", getCamelCaseString(domainObjectName, true));
130+
domainObjectName.setCharAt(0, Character.toUpperCase(domainObjectName.charAt(0)));
131+
BeanUtils.setProperty(fullyQualifiedTable, "domainObjectName", domainObjectName.toString());
131132

132133
// 重新初始化一下属性
133134
BeanUtils.invoke(introspectedTable, IntrospectedTable.class, "calculateJavaClientAttributes");

0 commit comments

Comments
 (0)