public abstract class BaseConfiguration extends AbstractPropertyHolder
| Modifier and Type | Field and Description |
|---|---|
protected Boolean |
allColumnDelimitingEnabled
所有的列名都增加标识限定符
|
protected String |
beginningDelimiter
开始的标识限定符
|
protected String |
catalog
数据库中的catalog,用于查询数据库表结构信息
|
protected String |
endingDelimiter
结束的标识限定符
|
protected String |
entityClassPrefix
entityClass的前缀
|
protected String |
entityClassSuffix
entityClass的后缀
|
protected Set<String> |
entityImportPackages
实体类需要import package names
|
protected String |
entityName
实体类名(entityClass name)
|
protected String |
entityOutputPath
实体类文件保存的目录(默认值为:java,会在
Configuration.rootOutputPath 创建这样的子目录:
"entityOutputPath" + "entityPackageName
转换为目录"。示例:com/test/user/entity) |
protected String |
entityPackageName
实体类package name
|
protected String |
entitySuperClass
实体类的父类class name
|
protected Map<String,Field> |
entitySuperClassFields
实体类的父类class所有字段
|
protected String |
entityTemplatePath
实体类模版路径,默认值为:templates/freemarker/entity.ftl
|
protected Boolean |
ignoredInSuperClassField
忽略字段是否在父类class中
|
protected Set<String> |
mapperImportPackages
Mapper接口需要import package names
|
protected String |
mapperName
Mapper接口名
|
protected String |
mapperOutputPath
Mapper接口文件保存的目录(默认值为:java,会在
Configuration.rootOutputPath
创建这样的子目录: "mapperOutputPath" + "mapperPackageName
转换为目录"。示例:com/test/user/mapper) |
protected String |
mapperPackageName
Mapper接口package name
|
protected String |
mapperSuperClass
Mapper接口的父类class name
|
protected String |
mapperTemplatePath
Mapper接口模版路径,默认值为:templates/freemarker/mapper.java.ftl
|
protected String |
mapperXMLOutputPath
Mapper XML文件保存的目录(默认为:resources/mybatis/mapper,会在
Configuration.rootOutputPath 创建这样的子目录: "mapperXMLOutputPath" + "
mapperPackageName
转换为目录,取父级模块名字"。示例:resources/mybatis/mapper/user) |
protected String |
mapperXMLTemplatePath
Mapper XML模版路径,默认值为:templates/freemarker/mapper.xml.ftl
|
protected String |
removeEntityClassPrefix
移除掉entityClassName的前缀
|
protected String |
removeEntityClassSuffix
移除掉entityClassName的后缀
|
protected String |
rootPackageName
父类package name,可以只设置此字段,默认会分为:entity、mapper、service、web
|
protected String |
schema
数据库中的schema,用于查询数据库表结构信息
|
protected app.myoss.cloud.mybatis.table.annotation.GenerationType |
sequenceStrategy
生成主键id策略类型【sequenceStrategy和sequenceTemplatePath二选一】
|
protected String |
sequenceTemplatePath
生成主键id模版路径【sequenceStrategy和sequenceTemplatePath二选一】
|
protected Set<String> |
serviceImplImportPackages
service实现类需要import package names
|
protected String |
serviceImplName
service实现类名
|
protected String |
serviceImplOutputPath
service实现类文件保存的目录(默认值为:java,会在
Configuration.rootOutputPath
创建这样的子目录: "serviceImplOutputPath" + "serviceImplPackageName
转换为目录"。示例:com/test/user/service/impl) |
protected String |
serviceImplPackageName
service实现类package name
|
protected String |
serviceImplSuperClass
service实现类的父类class name
|
protected String |
serviceImplTemplatePath
service实现类模版路径,默认值为:templates/freemarker/serviceImpl.java.ftl
|
protected Set<String> |
serviceImportPackages
service接口需要import package names
|
protected String |
serviceName
service接口名
|
protected String |
serviceOutputPath
service接口文件保存的目录(默认值为:java,会在
Configuration.rootOutputPath
创建这样的子目录: "serviceOutputPath" + "servicePackageName
转换为目录"。示例:com/test/user/service) |
protected String |
servicePackageName
service接口package name
|
protected String |
serviceSuperClass
service接口的父类class name
|
protected String |
serviceTemplatePath
service接口模版路径,默认值为:templates/freemarker/service.java.ftl
|
protected Boolean |
useCatalogOnGenerate
生成文件的时候是否使用数据库中的catalog,如果设置为true,将在表名前面加上catalog指定的值
|
protected Boolean |
useSchemaOnGenerate
生成文件的时候是否使用数据库中的schema,如果设置为true,将在表名前面加上schema指定的值
|
protected Set<String> |
webImportPackages
web类需要import package names
|
protected String |
webName
web类名
|
protected String |
webOutputPath
web类文件保存的目录(默认值为:java,会在
Configuration.rootOutputPath 创建这样的子目录:
"webOutputPath" + "webPackageName 转换为目录"。示例:com/test/user/web) |
protected String |
webPackageName
web类package name
|
protected String |
webRequestName
web类对应Http请求的接口名,默认值为:
entityName |
protected String |
webSuperClass
web类的父类class name
|
protected String |
webTemplatePath
web类模版路径,默认值为:templates/freemarker/webRestApi.java.ftl
|
| Constructor and Description |
|---|
BaseConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
BaseConfiguration |
addEntityImportPackage(String... importPackage)
为实体类添加一个import package name
|
BaseConfiguration |
addMapperImportPackage(String... importPackage)
为Mapper接口类添加一个import package name
|
BaseConfiguration |
addServiceImplImportPackage(String... importPackage)
为Service实现类添加一个import package name
|
BaseConfiguration |
addServiceImportPackage(String... importPackage)
为Service接口类添加一个import package name
|
BaseConfiguration |
addWebImportPackage(String... importPackage)
为Web类添加一个import package name
|
addProperty, setPropertiesprotected String catalog
protected Boolean useCatalogOnGenerate
protected String schema
protected Boolean useSchemaOnGenerate
protected Boolean allColumnDelimitingEnabled
protected String beginningDelimiter
protected String endingDelimiter
protected String rootPackageName
protected String entityName
protected String removeEntityClassPrefix
protected String removeEntityClassSuffix
protected String entityClassPrefix
protected String entityClassSuffix
protected String entityPackageName
protected String entitySuperClass
protected app.myoss.cloud.mybatis.table.annotation.GenerationType sequenceStrategy
protected String sequenceTemplatePath
protected String entityOutputPath
Configuration.rootOutputPath 创建这样的子目录:
"entityOutputPath" + "entityPackageName
转换为目录"。示例:com/test/user/entity)protected String entityTemplatePath
protected Boolean ignoredInSuperClassField
protected String mapperName
自定义文件命名,使用 %s 自动填充表实体名,举例:%sMapper,会生成 UserMapper
protected String mapperPackageName
protected String mapperSuperClass
protected String mapperOutputPath
Configuration.rootOutputPath
创建这样的子目录: "mapperOutputPath" + "mapperPackageName
转换为目录"。示例:com/test/user/mapper)protected String mapperTemplatePath
protected String mapperXMLOutputPath
Configuration.rootOutputPath 创建这样的子目录: "mapperXMLOutputPath" + "
mapperPackageName
转换为目录,取父级模块名字"。示例:resources/mybatis/mapper/user)protected String mapperXMLTemplatePath
protected String serviceName
自定义文件命名,使用 %s 自动填充表实体名,举例:%sService,会生成 UserService
protected String servicePackageName
protected String serviceSuperClass
protected String serviceOutputPath
Configuration.rootOutputPath
创建这样的子目录: "serviceOutputPath" + "servicePackageName
转换为目录"。示例:com/test/user/service)protected String serviceTemplatePath
protected String serviceImplName
自定义文件命名,使用 %s 自动填充表实体名,举例:%sServiceImpl,会生成 UserServiceImpl
protected String serviceImplPackageName
protected Set<String> serviceImplImportPackages
protected String serviceImplSuperClass
protected String serviceImplOutputPath
Configuration.rootOutputPath
创建这样的子目录: "serviceImplOutputPath" + "serviceImplPackageName
转换为目录"。示例:com/test/user/service/impl)protected String serviceImplTemplatePath
protected String webName
自定义文件命名,使用 %s 自动填充表实体名,举例:%sController,会生成 UserController
protected String webPackageName
protected String webSuperClass
protected String webOutputPath
Configuration.rootOutputPath 创建这样的子目录:
"webOutputPath" + "webPackageName 转换为目录"。示例:com/test/user/web)protected String webTemplatePath
protected String webRequestName
entityNamepublic BaseConfiguration addEntityImportPackage(String... importPackage)
importPackage - import package namepublic BaseConfiguration addMapperImportPackage(String... importPackage)
importPackage - import package namepublic BaseConfiguration addServiceImportPackage(String... importPackage)
importPackage - import package namepublic BaseConfiguration addServiceImplImportPackage(String... importPackage)
importPackage - import package namepublic BaseConfiguration addWebImportPackage(String... importPackage)
importPackage - import package nameCopyright © 2018–2020 Pivotal Software, Inc.. All rights reserved.