Skip to content

Commit b53708f

Browse files
committed
Related to #47. config->configLocation and new docs
1 parent 954ff2f commit b53708f

File tree

2 files changed

+34
-8
lines changed

2 files changed

+34
-8
lines changed

mybatis-spring-boot-autoconfigure/src/main/java/org/mybatis/spring/boot/autoconfigure/MybatisProperties.java

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ public class MybatisProperties {
3737

3838
public static final String MYBATIS_PREFIX = "mybatis";
3939

40-
/**
41-
* Config file path.
42-
*/
43-
private String config;
44-
40+
/**
41+
* Config file path.
42+
*/
43+
private String configLocation;
44+
4545
/**
4646
* Location of mybatis mapper files.
4747
*/
@@ -72,12 +72,30 @@ public class MybatisProperties {
7272
*/
7373
private Configuration configuration;
7474

75+
/**
76+
* @since 1.1.0
77+
* @return
78+
*/
79+
public String getConfigLocation() {
80+
return this.configLocation;
81+
}
82+
83+
/**
84+
* @since 1.1.0
85+
* @return
86+
*/
87+
public void setConfigLocation(String configLocation) {
88+
this.configLocation = configLocation;
89+
}
90+
91+
@Deprecated
7592
public String getConfig() {
76-
return this.config;
93+
return this.configLocation;
7794
}
7895

96+
@Deprecated
7997
public void setConfig(String config) {
80-
this.config = config;
98+
this.configLocation = config;
8199
}
82100

83101
public String[] getMapperLocations() {

mybatis-spring-boot-autoconfigure/src/site/xdoc/index.xml.vm

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public class CityDao {
194194
<tbody>
195195
<tr>
196196
<td>
197-
config
197+
config-location
198198
</td>
199199
<td>
200200
MyBatis xml config file (optional)
@@ -232,6 +232,14 @@ public class CityDao {
232232
Executor type: SIMPLE, REUSE, BATCH (optional)
233233
</td>
234234
</tr>
235+
<tr>
236+
<td>
237+
configuration
238+
</td>
239+
<td>
240+
A MyBatis <code>Configuration</code> bean.
241+
</td>
242+
</tr>
235243
</tbody>
236244
</table>
237245

0 commit comments

Comments
 (0)