Class ThymeleafLanguageDriverConfig

java.lang.Object
org.mybatis.scripting.thymeleaf.SqlGeneratorConfig
org.mybatis.scripting.thymeleaf.ThymeleafLanguageDriverConfig

public class ThymeleafLanguageDriverConfig extends SqlGeneratorConfig
Configuration class for ThymeleafLanguageDriver.
Since:
1.0.0
Author:
Kazuki Shimizu
  • Constructor Details

    • ThymeleafLanguageDriverConfig

      public ThymeleafLanguageDriverConfig()
  • Method Details

    • getTemplateFile

      Description copied from class: SqlGeneratorConfig
      Get a template file configuration.
      Overrides:
      getTemplateFile in class SqlGeneratorConfig
      Returns:
      a template file configuration
    • newInstance

      public static ThymeleafLanguageDriverConfig newInstance()
      Create an instance from default properties file.
      If you want to customize a default 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=...).
      About supported common properties see SqlGeneratorConfig.newInstance(). Supported specific properties are as follows:
      Supported properties
      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
      Returns:
      a configuration instance
      See Also:
    • newInstance

      public static ThymeleafLanguageDriverConfig newInstance(String resourcePath)
      Create an instance from specified properties file.
      you can configure some property using specified properties file that encoded by UTF-8. Also, you can change file encoding that will read using system property (-Dmybatis-thymeleaf.config.encoding=...).
      Parameters:
      resourcePath - A property file resource path
      Returns:
      a configuration instance
      See Also:
    • newInstance

      public static ThymeleafLanguageDriverConfig newInstance(Properties customProperties)
      Create an instance from specified properties.
      Parameters:
      customProperties - custom configuration properties
      Returns:
      a configuration instance
      See Also:
    • newInstance

      public static ThymeleafLanguageDriverConfig newInstance(Consumer<ThymeleafLanguageDriverConfig> customizer)
      Create an instance using specified customizer and override using a default properties file.
      Parameters:
      customizer - baseline customizer
      Returns:
      a configuration instance
      See Also: