mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 09:38:26 +08:00
test: 测试代码生成器。
This commit is contained in:
parent
52a26d0dea
commit
852b1b222d
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
|
* Copyright (c) 2022-2024, Mybatis-Flex (fuhai999@gmail.com).
|
||||||
* <p>
|
* <p>
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -23,6 +23,7 @@ import com.mybatisflex.codegen.config.TableConfig;
|
|||||||
import com.mybatisflex.codegen.config.TableDefConfig;
|
import com.mybatisflex.codegen.config.TableDefConfig;
|
||||||
import com.mybatisflex.codegen.constant.TemplateConst;
|
import com.mybatisflex.codegen.constant.TemplateConst;
|
||||||
import com.mybatisflex.core.mask.Masks;
|
import com.mybatisflex.core.mask.Masks;
|
||||||
|
import com.mybatisflex.spring.service.impl.CacheableServiceImpl;
|
||||||
import com.zaxxer.hikari.HikariDataSource;
|
import com.zaxxer.hikari.HikariDataSource;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@ -93,7 +94,7 @@ public class GeneratorTest {
|
|||||||
HikariDataSource dataSource = new HikariDataSource();
|
HikariDataSource dataSource = new HikariDataSource();
|
||||||
dataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf-8");
|
dataSource.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf-8");
|
||||||
dataSource.setUsername("root");
|
dataSource.setUsername("root");
|
||||||
dataSource.setPassword("123456");
|
dataSource.setPassword("12345678");
|
||||||
|
|
||||||
GlobalConfig globalConfig = new GlobalConfig();
|
GlobalConfig globalConfig = new GlobalConfig();
|
||||||
|
|
||||||
@ -133,7 +134,7 @@ public class GeneratorTest {
|
|||||||
globalConfig.enableService();
|
globalConfig.enableService();
|
||||||
// 配置生成 serviceImpl
|
// 配置生成 serviceImpl
|
||||||
globalConfig.enableServiceImpl()
|
globalConfig.enableServiceImpl()
|
||||||
// .setSuperClass(CacheableServiceImpl.class)
|
.setSuperClass(CacheableServiceImpl.class)
|
||||||
.setCacheExample(true);
|
.setCacheExample(true);
|
||||||
// 配置生成 controller
|
// 配置生成 controller
|
||||||
globalConfig.enableController();
|
globalConfig.enableController();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user