mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-11 06:57:12 +08:00
chore: continew-starter 2.8.0 => 2.8.1
This commit is contained in:
@@ -141,9 +141,8 @@ public class GenConfigDO implements Serializable {
|
||||
*/
|
||||
@Schema(description = "类名前缀", example = "User")
|
||||
public String getClassNamePrefix() {
|
||||
String tableName = this.getTableName();
|
||||
String rawClassName = StrUtils.blankToDefault(this.getTablePrefix(), tableName, prefix -> StrUtil
|
||||
.removePrefix(tableName, prefix));
|
||||
String rawClassName = StrUtils.blankToDefault(this.getTablePrefix(), this.getTableName(), prefix -> StrUtil
|
||||
.removePrefix(this.getTableName(), prefix));
|
||||
return StrUtil.upperFirst(StrUtil.toCamelCase(rawClassName));
|
||||
}
|
||||
}
|
||||
|
@@ -28,10 +28,8 @@ import cn.hutool.db.meta.Table;
|
||||
import cn.hutool.extra.template.TemplateConfig;
|
||||
import cn.hutool.extra.template.TemplateEngine;
|
||||
import cn.hutool.extra.template.TemplateUtil;
|
||||
import cn.hutool.extra.template.engine.freemarker.FreemarkerEngine;
|
||||
import cn.hutool.system.SystemUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import freemarker.ext.beans.BeansWrapper;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -291,10 +289,6 @@ public class GeneratorServiceImpl implements GeneratorService {
|
||||
Map<String, GeneratorProperties.TemplateConfig> templateConfigMap = generatorProperties.getTemplateConfigs();
|
||||
TemplateEngine engine = TemplateUtil
|
||||
.createEngine(new TemplateConfig("templates", TemplateConfig.ResourceMode.CLASSPATH));
|
||||
if (engine instanceof FreemarkerEngine freemarkerEngine) {
|
||||
freemarkerEngine.getConfiguration()
|
||||
.setSharedVariable("statics", BeansWrapper.getDefaultInstance().getStaticModels());
|
||||
}
|
||||
for (Map.Entry<String, GeneratorProperties.TemplateConfig> templateConfigEntry : templateConfigMap.entrySet()) {
|
||||
GeneratorProperties.TemplateConfig templateConfig = templateConfigEntry.getValue();
|
||||
// 移除需要忽略的字段
|
||||
|
Reference in New Issue
Block a user