baomidou / mybatis-plus

An powerful enhanced toolkit of MyBatis for simplify development
https://baomidou.com
Apache License 2.0
16.25k stars 4.29k forks source link

代码生成器 - strategyConfig 配置不生效 #6245

Closed mlrl-github closed 3 months ago

mlrl-github commented 3 months ago

当前使用版本 mybatis-plus-generator-3.5.6

描述bug现象 调用了 disable 方法, 相应的文件也会生成

提供问题复现步骤 FastAutoGenerator generator = FastAutoGenerator.create(url, username, password) .globalConfig(builder -> builder .author(author) .outputDir(outputDir) ) .strategyConfig(table -> table .addInclude(tables) .addTablePrefix(tablePrefix) ) .packageConfig(builder -> builder .parent("") .entity("")//entity .mapper("")//mapper .service("")//service .serviceImpl("")//impl .xml("")//xml .controller("")//controller ) .strategyConfig(entity -> entity .mapperBuilder().disable() .controllerBuilder().disable() .serviceBuilder().disable() .entityBuilder().disable() ) .templateEngine(new FreemarkerTemplateEngine()); generator.execute();

运行结果 image

liangjihua commented 3 months ago

+1

nieqiurong commented 3 months ago

6060