1234567891011121314151617181920212223242526 |
- package com.nokia.finance.tasks;
- import com.baomidou.mybatisplus.generator.FastAutoGenerator;
- import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
- import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
- public class MybatisPlusGeneratorTest {
- public static void main(String[] args) {
- FastAutoGenerator.create(
- new DataSourceConfig.Builder("jdbc:postgresql://172.16.107.5:5432/financialdb",
- "finance",
- "Finance@unicom23").schema("common"))
- .globalConfig(builder -> {
- builder.outputDir("z:/").disableOpenDir();
- })
- .strategyConfig(builder -> {
- builder.addInclude("data_log")
- .entityBuilder()
- .disableSerialVersionUID()
- .enableFileOverride()
- .enableLombok();
- })
- .templateEngine(new FreemarkerTemplateEngine())
- .execute();
- }
- }
|