mirror of
https://github.com/moshowgame/SpringBootCodeGenerator.git
synced 2026-06-23 22:18:13 +08:00
fix: #143 驼峰列名转命名风格错误问题
1. fix #143 2. 增强命名风格转换, 对原始风格不敏感. 支持各种命名风格的列名 2. 附带增加 NonCaseString 大小写不敏感字符串包装类, 简化编码 3. 几点代码小优化
This commit is contained in:
25
generator-web/src/test/java/FooTest.java
Normal file
25
generator-web/src/test/java/FooTest.java
Normal file
@@ -0,0 +1,25 @@
|
||||
import com.softdev.system.generator.util.StringUtils;
|
||||
|
||||
public class FooTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// String updateTime = StringUtils.underlineToCamelCase("updateTime");
|
||||
// System.out.println(updateTime);
|
||||
|
||||
|
||||
// System.out.println(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "userName"));
|
||||
// System.out.println(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, "userNAme-UUU"));
|
||||
|
||||
System.out.println(StringUtils.toUnderline("userName",false));
|
||||
System.out.println(StringUtils.toUnderline("UserName",false));
|
||||
System.out.println(StringUtils.toUnderline("user_NameGgg_x-UUU",false));
|
||||
System.out.println(StringUtils.toUnderline("username",false));
|
||||
|
||||
System.out.println(StringUtils.toUnderline("userName",true));
|
||||
System.out.println(StringUtils.toUnderline("UserName",true));
|
||||
System.out.println(StringUtils.toUnderline("user_NameGgg_x-UUU",true));
|
||||
System.out.println(StringUtils.toUnderline("username",true));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user