Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fenghuo12
zheng
提交
ccb869f6
Z
zheng
项目概览
fenghuo12
/
zheng
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zheng
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ccb869f6
编写于
10月 24, 2016
作者:
shuzheng5201314
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mybatis配置提到common中
上级
395d2c22
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
6 deletion
+7
-6
cms/cms-service/src/main/java/com/zheng/cms/dao/mapper/UserVOMapper.xml
...e/src/main/java/com/zheng/cms/dao/mapper/UserVOMapper.xml
+2
-2
cms/cms-service/src/main/java/com/zheng/cms/dao/model/UserVO.java
...service/src/main/java/com/zheng/cms/dao/model/UserVO.java
+0
-1
common/src/main/resources/applicationContext-jdbc.xml
common/src/main/resources/applicationContext-jdbc.xml
+3
-3
common/src/main/resources/mybatis-config.xml
common/src/main/resources/mybatis-config.xml
+2
-0
未找到文件。
cms/cms-service/src/main/java/com/zheng/cms/dao/mapper/UserVOMapper.xml
浏览文件 @
ccb869f6
...
...
@@ -6,7 +6,7 @@
<cache
type=
"org.mybatis.caches.ehcache.LoggingEhcache"
/>
<!-- 结果映射关系 -->
<resultMap
id=
"UserResultMap"
type=
"
u
serVO"
>
<resultMap
id=
"UserResultMap"
type=
"
com.zheng.cms.dao.model.U
serVO"
>
<id
column=
"u_id"
property=
"id"
/>
<result
column=
"username"
property=
"username"
/>
<result
column=
"password"
property=
"password"
/>
...
...
@@ -14,7 +14,7 @@
<result
column=
"sex"
property=
"sex"
/>
<result
column=
"ctime"
property=
"ctime"
/>
<result
column=
"content"
property=
"content"
/>
<collection
column=
"userid"
property=
"books"
ofType=
"Book"
>
<collection
column=
"userid"
property=
"books"
ofType=
"
com.zheng.cms.dao.model.
Book"
>
<id
column=
"b_id"
property=
"id"
/>
<result
column=
"userid"
property=
"userid"
/>
<result
column=
"name"
property=
"name"
/>
...
...
cms/cms-service/src/main/java/com/zheng/cms/dao/model/UserVO.java
浏览文件 @
ccb869f6
package
com.zheng.cms.dao.model
;
import
java.awt.print.Book
;
import
java.util.List
;
/**
...
...
c
ms/cms-dao
/src/main/resources/applicationContext-jdbc.xml
→
c
ommon
/src/main/resources/applicationContext-jdbc.xml
浏览文件 @
ccb869f6
...
...
@@ -34,7 +34,7 @@
<property
name=
"timeBetweenEvictionRunsMillis"
value=
"60000"
/>
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property
name=
"minEvictableIdleTimeMillis"
value=
"300000"
/>
<!-- -->
<!--
校验语句
-->
<property
name=
"validationQuery"
value=
"SELECT 1"
/>
<property
name=
"testWhileIdle"
value=
"true"
/>
<property
name=
"testOnBorrow"
value=
"false"
/>
...
...
@@ -47,11 +47,11 @@
<bean
id=
"sqlSessionFactory"
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"configLocation"
value=
"classpath:mybatis-config.xml"
/>
<property
name=
"mapperLocations"
value=
"classpath
:com/zheng/cms/dao
/mapper/*Mapper.xml"
/>
<property
name=
"mapperLocations"
value=
"classpath
*:**
/mapper/*Mapper.xml"
/>
</bean>
<!-- Mapper接口所在包名,Spring会自动查找其下的Mapper -->
<bean
class=
"org.mybatis.spring.mapper.MapperScannerConfigurer"
>
<property
name=
"basePackage"
value=
"
com.zheng.cms.dao
.mapper"
/>
<property
name=
"basePackage"
value=
"
**
.mapper"
/>
<property
name=
"sqlSessionFactoryBeanName"
value=
"sqlSessionFactory"
/>
</bean>
...
...
c
ms/cms-dao
/src/main/resources/mybatis-config.xml
→
c
ommon
/src/main/resources/mybatis-config.xml
浏览文件 @
ccb869f6
...
...
@@ -10,8 +10,10 @@
</settings>
<!-- 该包下的model不用写包名,会使用 model的首字母小写的非限定类名来作为它的别名,若有注解@Alias("xxx"),则别名为注解值 -->
<!--
<typeAliases>
<package name="com.zheng.cms.dao.model" />
</typeAliases>
-->
</configuration>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录