META-INF.mybatis-generator.yml Maven / Gradle / Ivy
# The target generator types
generatorTypes:
# model + simple mapper + xml
- SIMPLE
# model + simple mapper + dynamic mapper + dynamic mapper support + xml
- DYNAMIC
# model only
- MODEL
# model + xml
- MODEL_XML
# dynamic mapper + dynamic mapper support
- DYNAMIC_MAPPER
# Whether extend dynamic mapper,default is true
extendDynamicMapper: true
# Whether overwrite generated file,default is false
overwrite: false
# Whether generate returned key,default is false
generateReturnedKey: false
# Whether generate column comment,default is true
generateComment: true
# Field is final or not, default is false
finalField: false
# Entity field's visibility (org.mybatis.generator.api.dom.java.JavaVisibility)
fieldVisibility: PROTECTED
# The table name trim regex pattern
# Setting '^Sys' will replace the generated table name start with Sys
tableNameTrimPattern: ""
# The column name trim regex pattern
# Setting '^Sys' will replace the generated column name start with Sys
columnNameTrimPattern: ""
# location settings
targetLocation:
# The base location
baseLocation: ""
# The java location
javaLocation: "src/main/java"
# The mapper xml location
mapperXmlLocation: "src/main/resources"
targetPackage:
# The base package
basePackage: ""
# The model package
modelPackage: "entity.model"
# The mapper interface package
mapperInterfacePackage: "mapper"
# The mapper xml package
mapperXmlPackage: "mapper"
targetConnection:
# The jdbc driver class name
jdbcDriverClassName: "com.mysql.cj.jdbc.Driver"
# The jdbc connection url
jdbcConnectionUrl: "jdbc:mysql://127.0.0.1:3306/database_name?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false"
# The jdbc username
username: "root"
# The jdbc password
password: "123456"
# The lombok annotations if needed
lombokAnnotations:
- lombok.extern.jackson.Jacksonized
- lombok.Builder(toBuilder = true)
- lombok.Getter
- lombok.RequiredArgsConstructor(access = lombok.AccessLevel.PRIVATE)
- lombok.EqualsAndHashCode
- lombok.ToString
# The target table names,or "%" to generate all tables
tableNames:
- table_name
© 2015 - 2025 Weber Informatics LLC | Privacy Policy