You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/site/xdoc/index.xml.vm
+48-29Lines changed: 48 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
<?xml version="1.0" encoding="UTF-8"?>
2
2
<!--
3
3
4
-
Copyright 2015-2017 the original author or authors.
4
+
Copyright 2015-2019 the original author or authors.
5
5
6
6
Licensed under the Apache License, Version 2.0 (the "License");
7
7
you may not use this file except in compliance with the License.
@@ -28,45 +28,33 @@
28
28
<body>
29
29
<sectionname="Introduction">
30
30
<p>
31
-
mybatis-freemarker is a plugin that helps creating big dynamic SQL queries. You can use it selectively, to only queries that need if statmenets or foreach-loops, for example. But it is possible to use this syntax by default too.
31
+
The mybatis-freemarker is a plugin that helps creating big dynamic SQL queries. You can use it selectively, to only queries that need if statmenets or foreach-loops, for example. But it is possible to use this syntax by default too.
32
32
</p>
33
33
<p>
34
34
If you are not familiar with FreeMarker syntax, you can view
35
-
<ul>
36
-
<li>
37
-
<ahref="http://freemarker.org/docs/ref.html">Template Language Reference</a>
38
-
</li>
39
-
</ul>
40
35
</p>
36
+
<ul>
37
+
<li>
38
+
<ahref="http://freemarker.org/docs/ref.html">Template Language Reference</a>
39
+
</li>
40
+
</ul>
41
41
</section>
42
42
43
43
<sectionname="Install">
44
44
<p>
45
-
mybatis-freemarker is available in <ahref="https://bintray.com/bintray/jcenter">jcenter</a> maven repository. So, if you are using maven, you can add this:
45
+
If you are using maven, you can add this:
46
46
</p>
47
47
<source><![CDATA[
48
-
<repositories>
49
-
<repository>
50
-
<id>jcenter</id>
51
-
<url>http://jcenter.bintray.com</url>
52
-
</repository>
53
-
</repositories>
54
-
55
-
<dependencies>
56
-
<dependency>
57
-
<groupId>org.mybatis.scripting</groupId>
58
-
<artifactId>mybatis-freemarker</artifactId>
59
-
<version>${project.version}</version>
60
-
</dependency>
61
-
</dependencies>]]></source>
48
+
<dependency>
49
+
<groupId>org.mybatis.scripting</groupId>
50
+
<artifactId>mybatis-freemarker</artifactId>
51
+
<version>${project.version}</version>
52
+
</dependency>
53
+
]]></source>
62
54
63
55
<p>If you are using gradle, you can use this snippet:</p>
By default, the <code>mybatis-freemarker.properties</code> file create in your classpath.
83
+
</p>
93
84
<ul>
94
-
<li>(Optional) Create <code>mybatis-freemarker.properties</code> file in your classpath:
95
-
<source>basePackage=sql</source>
96
-
This will define base package to search FreeMarker templates. By default it is empty string, so you will need to provide full path to template every time.
85
+
<li>
86
+
You can define the base package to search FreeMarker templates.
87
+
By default it is empty string, so you will need to provide full path to template every time.
88
+
<source><![CDATA[
89
+
# 'base-package' (kebab-case) can be used too
90
+
basePackage = sql
91
+
]]></source>
92
+
</li>
93
+
<li>
94
+
Since 2.1.0, you configure the FreeMarker configuration as follow:
95
+
About available setting name, please refer to <ahref="https://freemarker.apache.org/docs/api/freemarker/template/Configuration.html#setSetting-java.lang.String-java.lang.String-">the API documentation of FreeMarker</a>.
96
+
<source><![CDATA[
97
+
# freemarkerSettings.{name} = {value}
98
+
# 'freemarker-settings' (kebab-case) can be used too
99
+
freemarkerSettings.interpolation_syntax = dollar
100
+
]]></source>
101
+
</li>
102
+
<li>
103
+
Since 2.1.0, you can use an any properties file instead of the default properties file.
104
+
If you use an any properties file, please specify a properties file using the special system properties(<code>mybatis-freemarker.config.file</code>) as follow:
Since 2.1.0, you can use an any file encoding instead of the default file encoding(UTF-8).
111
+
If you use an any file encoding, please specify a file encoding using the special system properties(<code>mybatis-freemarker.config.encoding</code>) as follow:
<p>If your are using annotations-driven mappers, you don't need to do anything more. If you are using XML-driven mappers too, you may need to do next steps:</p>
0 commit comments