Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion src/site/xdoc/index.xml.vm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright 2015-2022 the original author or authors.
Copyright 2015-2023 the original author or authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -332,6 +332,30 @@ templateFile.pathProvider.cacheEnabled = false
</li>
</ul>

<p>
<span class="label important">TIPS</span><br/>
Since the MyBatis 3.5.6, you can omit the type attribute at each annotations when specify the default provider class as global configuration as follow:<br/>
Mapper interface:
<source><![CDATA[
public interface NameMapper extends BaseMapper {
@SelectProvider
List<Name> findByCondition(NameCondition condition);
}
]]></source>
Java based configuration:
<source><![CDATA[
Configuration configuration = new Configuration();
configuration.setDefaultSqlProviderType(TemplateFilePathProvider.class);
]]></source>
XML based configuration:
<source><![CDATA[
<settings>
<setting name="defaultSqlProviderType" value="org.mybatis.scripting.freemarker.support.TemplateFilePathProvider"/>
</settings>
]]></source>

</p>

</section>

<section name="Examples">
Expand Down