生成controller是模板引擎的原因,因此得从此解决,话不多说上代码:

FastAutoGenerator.create("db_url", "db_name", "dp_password")
                // 模板引擎
                .templateEngine(new FreemarkerTemplateEngine())
                // 添加此配置即可解决
                .templateConfig(builder -> builder.controller(""))
                .execute();

参考链接
mybatis plus 代码生成器 设置不生成controller文件这篇文章说的是老版本代码生产器方法,新版本采取了建造者模式构建,因此存在稍许不同但原理一致

更多推荐

mybatis plus代码生成器3.5.1 设置不生成controller