类 TemplateFilePlugin
- java.lang.Object
-
- org.mybatis.generator.api.PluginAdapter
-
- tk.mybatis.mapper.generator.TemplateFilePlugin
-
- 所有已实现的接口:
org.mybatis.generator.api.Plugin
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>- 从以下版本开始:
- 3.4.5
- 作者:
- liuzh
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringDEFAULT_TEMPLATEFORMATTER默认的模板格式化类
-
构造器概要
构造器 构造器 说明 TemplateFilePlugin()
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 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.FieldconvertToJavaBeansField(org.mybatis.generator.api.IntrospectedColumn introspectedColumn)列转换为字段protected Stringread(InputStream inputStream)读取文件voidsetProperties(Properties properties)booleanvalidate(List<String> warnings)-
从类继承的方法 org.mybatis.generator.api.PluginAdapter
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
-
-
-
-
方法详细资料
-
convertToJavaBeansField
public static org.mybatis.generator.api.dom.java.Field convertToJavaBeansField(org.mybatis.generator.api.IntrospectedColumn introspectedColumn)
列转换为字段- 参数:
introspectedColumn-- 返回:
-
read
protected String read(InputStream inputStream) throws IOException
读取文件- 参数:
inputStream-- 返回:
- 抛出:
IOException
-
contextGenerateAdditionalJavaFiles
public List<org.mybatis.generator.api.GeneratedJavaFile> contextGenerateAdditionalJavaFiles(org.mybatis.generator.api.IntrospectedTable introspectedTable)
- 指定者:
contextGenerateAdditionalJavaFiles在接口中org.mybatis.generator.api.Plugin- 覆盖:
contextGenerateAdditionalJavaFiles在类中org.mybatis.generator.api.PluginAdapter
-
contextGenerateAdditionalJavaFiles
public List<org.mybatis.generator.api.GeneratedJavaFile> contextGenerateAdditionalJavaFiles()
- 指定者:
contextGenerateAdditionalJavaFiles在接口中org.mybatis.generator.api.Plugin- 覆盖:
contextGenerateAdditionalJavaFiles在类中org.mybatis.generator.api.PluginAdapter
-
setProperties
public void setProperties(Properties properties)
- 指定者:
setProperties在接口中org.mybatis.generator.api.Plugin- 覆盖:
setProperties在类中org.mybatis.generator.api.PluginAdapter
-
-