public class TemplateFilePlugin
extends org.mybatis.generator.api.PluginAdapter
<plugin type="xxx.TemplateFilePlugin"> <property name="targetProject" value="src/main/java"/> <property name="targetPackage" value="com.xxx.controller"/> <property name="templatePath" value="template/controller.ftl"/> <property name="fileName" value="XXXController.java"/> <property name="templateFormatter" value="xxx.FreemarkerTemplateFormatter"/> </plugin>
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_TEMPLATEFORMATTER
默认的模板格式化类
|
Constructor and Description |
---|
TemplateFilePlugin() |
Modifier and Type | Method and Description |
---|---|
List<org.mybatis.generator.api.GeneratedJavaFile> |
contextGenerateAdditionalJavaFiles() |
List<org.mybatis.generator.api.GeneratedJavaFile> |
contextGenerateAdditionalJavaFiles(org.mybatis.generator.api.IntrospectedTable introspectedTable) |
static org.mybatis.generator.api.dom.java.Field |
convertToJavaBeansField(org.mybatis.generator.api.IntrospectedColumn introspectedColumn)
列转换为字段
|
protected String |
read(InputStream inputStream)
读取文件
|
void |
setProperties(Properties properties) |
boolean |
validate(List<String> warnings) |
clientBasicCountMethodGenerated, clientBasicDeleteMethodGenerated, clientBasicInsertMethodGenerated, clientBasicSelectManyMethodGenerated, clientBasicSelectOneMethodGenerated, clientBasicUpdateMethodGenerated, clientCountByExampleMethodGenerated, clientCountByExampleMethodGenerated, clientDeleteByExampleMethodGenerated, clientDeleteByExampleMethodGenerated, clientDeleteByPrimaryKeyMethodGenerated, clientDeleteByPrimaryKeyMethodGenerated, clientGenerated, clientInsertMethodGenerated, clientInsertMethodGenerated, clientInsertSelectiveMethodGenerated, clientInsertSelectiveMethodGenerated, clientSelectAllMethodGenerated, clientSelectAllMethodGenerated, clientSelectByExampleWithBLOBsMethodGenerated, clientSelectByExampleWithBLOBsMethodGenerated, clientSelectByExampleWithoutBLOBsMethodGenerated, clientSelectByExampleWithoutBLOBsMethodGenerated, clientSelectByPrimaryKeyMethodGenerated, clientSelectByPrimaryKeyMethodGenerated, clientUpdateByExampleSelectiveMethodGenerated, clientUpdateByExampleSelectiveMethodGenerated, clientUpdateByExampleWithBLOBsMethodGenerated, clientUpdateByExampleWithBLOBsMethodGenerated, clientUpdateByExampleWithoutBLOBsMethodGenerated, clientUpdateByExampleWithoutBLOBsMethodGenerated, clientUpdateByPrimaryKeySelectiveMethodGenerated, clientUpdateByPrimaryKeySelectiveMethodGenerated, clientUpdateByPrimaryKeyWithBLOBsMethodGenerated, clientUpdateByPrimaryKeyWithBLOBsMethodGenerated, clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated, clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated, contextGenerateAdditionalXmlFiles, contextGenerateAdditionalXmlFiles, getContext, getProperties, initialized, modelBaseRecordClassGenerated, modelExampleClassGenerated, modelFieldGenerated, modelGetterMethodGenerated, modelPrimaryKeyClassGenerated, modelRecordWithBLOBsClassGenerated, modelSetterMethodGenerated, providerApplyWhereMethodGenerated, providerCountByExampleMethodGenerated, providerDeleteByExampleMethodGenerated, providerGenerated, providerInsertSelectiveMethodGenerated, providerSelectByExampleWithBLOBsMethodGenerated, providerSelectByExampleWithoutBLOBsMethodGenerated, providerUpdateByExampleSelectiveMethodGenerated, providerUpdateByExampleWithBLOBsMethodGenerated, providerUpdateByExampleWithoutBLOBsMethodGenerated, providerUpdateByPrimaryKeySelectiveMethodGenerated, setContext, sqlMapBaseColumnListElementGenerated, sqlMapBlobColumnListElementGenerated, sqlMapCountByExampleElementGenerated, sqlMapDeleteByExampleElementGenerated, sqlMapDeleteByPrimaryKeyElementGenerated, sqlMapDocumentGenerated, sqlMapExampleWhereClauseElementGenerated, sqlMapGenerated, sqlMapInsertElementGenerated, sqlMapInsertSelectiveElementGenerated, sqlMapResultMapWithBLOBsElementGenerated, sqlMapResultMapWithoutBLOBsElementGenerated, sqlMapSelectAllElementGenerated, sqlMapSelectByExampleWithBLOBsElementGenerated, sqlMapSelectByExampleWithoutBLOBsElementGenerated, sqlMapSelectByPrimaryKeyElementGenerated, sqlMapUpdateByExampleSelectiveElementGenerated, sqlMapUpdateByExampleWithBLOBsElementGenerated, sqlMapUpdateByExampleWithoutBLOBsElementGenerated, sqlMapUpdateByPrimaryKeySelectiveElementGenerated, sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated, sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated
public static final String DEFAULT_TEMPLATEFORMATTER
public static org.mybatis.generator.api.dom.java.Field convertToJavaBeansField(org.mybatis.generator.api.IntrospectedColumn introspectedColumn)
introspectedColumn
- protected String read(InputStream inputStream) throws IOException
inputStream
- IOException
public List<org.mybatis.generator.api.GeneratedJavaFile> contextGenerateAdditionalJavaFiles(org.mybatis.generator.api.IntrospectedTable introspectedTable)
contextGenerateAdditionalJavaFiles
in interface org.mybatis.generator.api.Plugin
contextGenerateAdditionalJavaFiles
in class org.mybatis.generator.api.PluginAdapter
public List<org.mybatis.generator.api.GeneratedJavaFile> contextGenerateAdditionalJavaFiles()
contextGenerateAdditionalJavaFiles
in interface org.mybatis.generator.api.Plugin
contextGenerateAdditionalJavaFiles
in class org.mybatis.generator.api.PluginAdapter
public void setProperties(Properties properties)
setProperties
in interface org.mybatis.generator.api.Plugin
setProperties
in class org.mybatis.generator.api.PluginAdapter
Copyright © 2018. All rights reserved.