File tree Expand file tree Collapse file tree 5 files changed +21
-10
lines changed
src/main/java/tk/mybatis/mapper/mapperhelper Expand file tree Collapse file tree 5 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 12
12
13
13
##项目文档
14
14
15
+ 初学者如果感觉下面的文档太多不方便入手,那么可以下载[ 通用Mapper简单实用文档.pdf] ( http://git.oschina.net/free/Mapper/attach_files/download?i=15246&u=http%3A%2F%2Ffiles.git.oschina.net%2Fgroup1%2FM00%2F00%2F99%2FfMqNk1XbGl2AQA8mAAKDipSqnlc703.pdf%3Ftoken%3D14d69a3d1526cb5b4dc3e1d2cc030b2c%26ts%3D1440516629 ) 学习基本的配置和使用!
16
+
15
17
###在你打算使用通用Mapper前,一定要看看下面的文档,许多人在初次使用时遇到的问题,99%都在文档中有说明!!
16
18
17
19
1 . [ Mapper3变化] ( http://git.oschina.net/free/Mapper/blob/master/wiki/mapper3/1.Changes.md )
@@ -108,17 +110,16 @@ http://repo1.maven.org/maven2/javax/persistence/persistence-api/1.0/
108
110
109
111
##Maven坐标以及下载地址
110
112
111
- ###测试版本3 .1.3-SNAPSHOT- 2015-08-02
113
+ ###最新版本3 .1.3 - 2015-08-25
112
114
113
- * 新增` MapperOnceInterceptor ` 拦截器,该拦截器执行后会自动卸载,以后不会再进入该方法,只需要将` MapperInterceptor ` 替换为` MapperOnceInterceptor ` 即可
114
- * 大家可以尝试` MapperOnceInterceptor ` 拦截器,发现问题可以提issue
115
- * 由于Spring中的` MapperHelper ` 的配置方式容易出现错误,因此从3.1.3以后废弃这种配置方法
115
+ * 去掉了3.1.3-SNAPSHOT版本中的` MapperOnceInterceptor ` 拦截器,下个版本会完善` MapperHelper ` 的配置方式
116
+ * ` Example ` 增加了` example.selectProperties("id", "countryname", ...) ` 方法,可以指定查询列,注意这里参数写的是属性名,` Example ` 会自动映射到列名
116
117
* ` Example ` 增加` andEqualTo(实体对象) ` 方法,可以将一个实体放进去,会自动根据属性和值拼出column=value的条件 <b >Bob - 0haizhu0@gmail.com 提供</b >
117
118
* MyBatis在处理` <cache/> ` 和` @CacheNamespace ` 的时候不统一,只有一个能生效,这导致xml中配置二级缓存对通用Mapper注解形式的方法无效,该问题已解决
118
119
* 二级缓存配置方法,如果接口有对应的xml,在xml中配置二级缓存。如果只有接口没有xml,用注解配置二级缓存即可
119
120
* 需要注意的是,二级缓存在xml配置时,只对通用Mapper方法有效,自己用` @Select ` 等注解定义的这种仍然无效,这种情况只能在xml中定义
120
121
121
- ###最新版本3 .1.2 - 2015-07-14
122
+ ###3 .1.2 - 2015-07-14
122
123
123
124
* 解决别名时的一种特殊情况,例如` @Column(name=" ` desc` ") ` 的时候,就不需要自动添加别名
124
125
* 反射获取所有列名的时候,不在自动转换为大写形式,对数据库区分大小写的情况有用
Original file line number Diff line number Diff line change 4
4
5
5
<groupId >tk.mybatis</groupId >
6
6
<artifactId >mapper</artifactId >
7
- <version >3.1.3-SNAPSHOT </version >
7
+ <version >3.1.3</version >
8
8
<packaging >jar</packaging >
9
9
10
10
<name >mapper</name >
142
142
<goals >
143
143
<goal >jar</goal >
144
144
</goals >
145
+ <configuration >
146
+ <additionalparam >-Xdoclint:none</additionalparam >
147
+ </configuration >
145
148
</execution >
146
149
</executions >
147
150
</plugin >
Original file line number Diff line number Diff line change @@ -261,7 +261,6 @@ private MapperTemplate fromMapperClass(Class<?> mapperClass) {
261
261
* 注册通用Mapper接口
262
262
*
263
263
* @param mapperClass
264
- * @throws Exception
265
264
*/
266
265
public void registerMapper (Class <?> mapperClass ) {
267
266
if (!registerMapper .containsKey (mapperClass )) {
@@ -280,7 +279,6 @@ public void registerMapper(Class<?> mapperClass) {
280
279
* 注册通用Mapper接口
281
280
*
282
281
* @param mapperClass
283
- * @throws Exception
284
282
*/
285
283
public void registerMapper (String mapperClass ) {
286
284
try {
Original file line number Diff line number Diff line change 7
7
*
8
8
* @author liuzh
9
9
*/
10
- public class OGNL {
10
+ public abstract class OGNL {
11
11
12
12
/**
13
13
* 是否包含自定义查询列
Original file line number Diff line number Diff line change 1
1
#更新日志
2
2
3
- ###3 .1.2 - 2015-07-14
3
+ ##3 .1.3 - 2015-08-25
4
+
5
+ * 去掉了3.1.3-SNAPSHOT版本中的` MapperOnceInterceptor ` 拦截器,下个版本会完善` MapperHelper ` 的配置方式
6
+ * ` Example ` 增加了` example.selectProperties("id", "countryname", ...) ` 方法,可以指定查询列,注意这里参数写的是属性名,` Example ` 会自动映射到列名
7
+ * ` Example ` 增加` andEqualTo(实体对象) ` 方法,可以将一个实体放进去,会自动根据属性和值拼出column=value的条件 <b >Bob - 0haizhu0@gmail.com 提供</b >
8
+ * MyBatis在处理` <cache/> ` 和` @CacheNamespace ` 的时候不统一,只有一个能生效,这导致xml中配置二级缓存对通用Mapper注解形式的方法无效,该问题已解决
9
+ * 二级缓存配置方法,如果接口有对应的xml,在xml中配置二级缓存。如果只有接口没有xml,用注解配置二级缓存即可
10
+ * 需要注意的是,二级缓存在xml配置时,只对通用Mapper方法有效,自己用` @Select ` 等注解定义的这种仍然无效,这种情况只能在xml中定义
11
+
12
+ ##3 .1.2 - 2015-07-14
4
13
5
14
* 解决别名时的一种特殊情况,例如` @Column(name=" ` desc` ") ` 的时候,就不需要自动添加别名
6
15
* 反射获取所有列名的时候,不在自动转换为大写形式,对数据库区分大小写的情况有用
You can’t perform that action at this time.
0 commit comments