diff --git a/mybatis-flex-codegen/src/test/java/com/mybatisflex/codegen/test/GeneratorTest.java b/mybatis-flex-codegen/src/test/java/com/mybatisflex/codegen/test/GeneratorTest.java index 2c256448..88cac244 100644 --- a/mybatis-flex-codegen/src/test/java/com/mybatisflex/codegen/test/GeneratorTest.java +++ b/mybatis-flex-codegen/src/test/java/com/mybatisflex/codegen/test/GeneratorTest.java @@ -18,7 +18,9 @@ package com.mybatisflex.codegen.test; import com.mybatisflex.codegen.Generator; import com.mybatisflex.codegen.config.GlobalConfig; +import com.mybatisflex.spring.service.impl.CacheableServiceImpl; import com.zaxxer.hikari.HikariDataSource; +import org.junit.Test; import java.util.function.UnaryOperator; @@ -81,7 +83,7 @@ public class GeneratorTest { generator.generate(); } -// @Test + @Test public void testCodeGen2() { //配置数据源 HikariDataSource dataSource = new HikariDataSource(); @@ -112,7 +114,7 @@ public class GeneratorTest { //设置模板路径 globalConfig.getTemplateConfig() - .setEntity("D:\\Documents\\配置文件\\entity.tpl"); + .setEntity("D:\\Documents\\配置文件\\entity.tpl"); //配置生成 entity globalConfig.enableEntity() @@ -125,7 +127,9 @@ public class GeneratorTest { //配置生成 service globalConfig.enableService(); //配置生成 serviceImpl - globalConfig.enableServiceImpl(); + globalConfig.enableServiceImpl() + .setSupperClass(CacheableServiceImpl.class) + .setCacheExample(true); //配置生成 controller globalConfig.enableController(); //配置生成 tableDef