Class SqlGeneratorConfig.TemplateFileConfig

java.lang.Object
org.mybatis.scripting.thymeleaf.SqlGeneratorConfig.TemplateFileConfig
Direct Known Subclasses:
ThymeleafLanguageDriverConfig.TemplateFileConfig
Enclosing class:
SqlGeneratorConfig

public static class SqlGeneratorConfig.TemplateFileConfig extends Object
Template file configuration.
Since:
1.0.0
  • Constructor Details

    • TemplateFileConfig

      public TemplateFileConfig()
  • Method Details

    • getEncoding

      public Charset getEncoding()
      Get the character encoding for reading template resource file.

      Default is UTF-8.

      Returns:
      the character encoding for reading template resource file
    • setEncoding

      public void setEncoding(Charset encoding)
      Set the character encoding for reading template resource file.
      Parameters:
      encoding - the character encoding for reading template resource file
    • getBaseDir

      public String getBaseDir()
      Get the base directory for reading template resource file.

      Default is ""(none).

      Returns:
      the base directory for reading template resource file
    • setBaseDir

      public void setBaseDir(String baseDir)
      Set the base directory for reading template resource file.
      Parameters:
      baseDir - the base directory for reading template resource file
    • getPatterns

      public String[] getPatterns()
      Get patterns for reading as template resource file.

      Default is "*.sql".

      Returns:
      patterns for reading as template resource file
    • setPatterns

      public void setPatterns(String... patterns)
      Set patterns for reading as template resource file.
      Parameters:
      patterns - patterns for reading as template resource file
    • isCacheEnabled

      public boolean isCacheEnabled()
      Get whether use the cache feature when load template resource file.

      Default is true.

      Returns:
      If use th cache feature, return true
    • setCacheEnabled

      public void setCacheEnabled(boolean cacheEnabled)
      Set whether use the cache feature when load template resource file.
      Parameters:
      cacheEnabled - If use th cache feature, set true
    • getCacheTtl

      public Long getCacheTtl()
      Get the cache TTL(millisecond) for resolved templates.

      Default is null(indicate to use default value of Thymeleaf).

      Returns:
      the cache TTL(millisecond) for resolved templates
    • setCacheTtl

      public void setCacheTtl(Long cacheTtl)
      Set the cache TTL(millisecond) for resolved templates.
      Parameters:
      cacheTtl - the cache TTL(millisecond) for resolved templates