Class TemplateFilePathProvider

java.lang.Object
org.mybatis.scripting.freemarker.support.TemplateFilePathProvider

public class TemplateFilePathProvider extends Object
The SQL provider class that return the SQL template file path.

IMPORTANT: This class required to use with mybatis 3.5.1+ and need to use with SQL provider annotation (such as SelectProvider as follow:

 package com.example.mapper;

 public interface BaseMapper<T> {

   @Options(useGeneratedKeys = true, keyProperty = "id")
   @InsertProvider(type = TemplateFilePathProvider.class)
   void insert(T entity);

   @UpdateProvider(type = TemplateFilePathProvider.class)
   void update(T entity);

   @DeleteProvider(type = TemplateFilePathProvider.class)
   void delete(T entity);

   @SelectProvider(type = TemplateFilePathProvider.class)
   T findById(Integer id);

 }
 
 package com.example.mapper;

 public interface NameMapper extends BaseMapper {

   @SelectProvider(type = TemplateFilePathProvider.class)
   List<Name> findByConditions(NameConditions conditions);

 }
 
Version:
1.2.0
Author:
Kazuki Shimizu