public class ThymeleafLanguageDriverConfig extends SqlGeneratorConfig
ThymeleafLanguageDriver.| Modifier and Type | Class and Description |
|---|---|
static class |
ThymeleafLanguageDriverConfig.TemplateFileConfig
Template file configuration for language driver of the MyBatis.
|
SqlGeneratorConfig.DialectConfig| Constructor and Description |
|---|
ThymeleafLanguageDriverConfig() |
| Modifier and Type | Method and Description |
|---|---|
ThymeleafLanguageDriverConfig.TemplateFileConfig |
getTemplateFile()
Get a template file configuration.
|
static ThymeleafLanguageDriverConfig |
newInstance()
Create an instance from default properties file.
|
static ThymeleafLanguageDriverConfig |
newInstance(Consumer<ThymeleafLanguageDriverConfig> customizer)
Create an instance using specified customizer and override using a default properties file.
|
static ThymeleafLanguageDriverConfig |
newInstance(Properties customProperties)
Create an instance from specified properties.
|
static ThymeleafLanguageDriverConfig |
newInstance(String resourcePath)
Create an instance from specified properties file.
|
getCustomizer, getDialect, isUse2way, newInstanceWithCustomizer, newInstanceWithProperties, newInstanceWithResourcePath, setCustomizer, setUse2waypublic ThymeleafLanguageDriverConfig.TemplateFileConfig getTemplateFile()
SqlGeneratorConfiggetTemplateFile in class SqlGeneratorConfigpublic static ThymeleafLanguageDriverConfig newInstance()
TemplateEngine, you can configure some property using
mybatis-thymeleaf.properties that encoded by UTF-8. Also, you can change the properties file that will read using
system property (-Dmybatis-thymeleaf.config.file=... -Dmybatis-thymeleaf.config.encoding=...). SqlGeneratorConfig.newInstance(). Supported specific properties are
as follows:
| Property Key | Description | Default |
|---|---|---|
| Template file path provider configuration(TemplateFilePathProvider) | ||
| template-file.path-provider.prefix | The prefix for adding to template file path | "" |
| template-file.path-provider.includes-package-path | Whether includes package path part | true |
| template-file.path-provider.separate-directory-per-mapper | Whether separate directory per mapper | true |
| template-file.path-provider.includes-mapper-name-when-separate-directory | Whether includes mapper name into file name when separate directory per mapper | true |
| template-file.path-provider.cache-enabled | Whether cache a resolved template file path | true |
SqlGeneratorConfig.newInstance()public static ThymeleafLanguageDriverConfig newInstance(String resourcePath)
resourcePath - A property file resource pathnewInstance(),
SqlGeneratorConfig.newInstance()public static ThymeleafLanguageDriverConfig newInstance(Properties customProperties)
customProperties - custom configuration propertiesnewInstance(),
SqlGeneratorConfig.newInstance()public static ThymeleafLanguageDriverConfig newInstance(Consumer<ThymeleafLanguageDriverConfig> customizer)
customizer - baseline customizernewInstance(),
SqlGeneratorConfig.newInstance()Copyright © 2018–2020 MyBatis.org. All rights reserved.