代码生成: 业务名/类名缺少合法性校验, 可能生成无法编译的 Java 包名

作者: CieveMe创建于 2026年9月26日更新于 2026年9月26日

Problem description

The "business name (businessName)" and "class name (className)" in the code generator only do non-empty validation, and do not do Java identifier legality validation. These two fields will be pasted into the Java package declaration and class name, so as long as the user fills in illegal characters (such as -, spaces, numbers starting with, Java keywords), the generated code will necessarily fail to compile, and the error location is far from the cause in the generated result.

内容来源: YunaiV/ruoyi-vue-pro