mirror of
https://github.com/moshowgame/SpringBootCodeGenerator.git
synced 2025-12-26 05:48:33 +08:00
parser:解析出错时打印出错信息
This commit is contained in:
parent
45d380ca5d
commit
f88a8c2940
@ -173,7 +173,13 @@ public class TableParseUtil {
|
||||
String columnName = "";
|
||||
columnLine = columnLine.replaceAll("`", " ").replaceAll("\"", " ").replaceAll("'", "").replaceAll(" ", " ").trim();
|
||||
//如果遇到username varchar(65) default '' not null,这种情况,判断第一个空格是否比第一个引号前
|
||||
columnName = columnLine.substring(0, columnLine.indexOf(" "));
|
||||
try {
|
||||
columnName = columnLine.substring(0, columnLine.indexOf(" "));
|
||||
} catch (StringIndexOutOfBoundsException e) {
|
||||
System.out.println("err happened: " + columnLine);
|
||||
throw e;
|
||||
}
|
||||
|
||||
// field Name
|
||||
// 2019-09-08 yj 添加是否下划线转换为驼峰的判断
|
||||
String fieldName = null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user