1.

applicationContext.xml  配置文件里最主要的配置:

<?xml version="1.0" encoding="utf-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
default-autowire="byName" default-lazy-init="false"> <!--本示例采用DBCP连接池,应预先把DBCP的jar包复制到工程的lib目录下。 -->
<context:property-placeholder location="classpath:/config/database.properties" /> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close" p:driverClassName="com.mysql.jdbc.Driver"
p:url="jdbc:mysql://127.0.0.1:3306/yiibai?characterEncoding=utf8"
p:username="root" p:password="" p:maxActive="10" p:maxIdle="10">
</bean> <bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<!--dataSource属性指定要用到的连接池-->
<property name="dataSource" ref="dataSource" />
<!--configLocation属性指定mybatis的核心配置文件-->
<property name="configLocation" value="classpath:config/Configuration.xml" />
<!-- 所有配置的mapper文件 -->
<property name="mapperLocations" value="classpath*:com/yiibai/mapepr/*.xml" />
</bean> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.yiibai.maper" />
</bean>
</beans>

  

https://www.yiibai.com/mybatis/mybatis_spring_mvc.html

第26月第18天 mybatis_spring_mvc的更多相关文章

  1. 九月 26, 2017 10:18:14 上午 com.sun.jersey.server.impl.application.RootResourceUriRules <init> 严重: The ResourceConfig instance does not contain any root resource classes.

    Tomcat启动错误:九月 26, 2017 10:18:14 上午 com.sun.jersey.server.impl.application.RootResourceUriRules <i ...

  2. 第20月第18天 小码哥swift

    1. 9月12日第一次更新 第二篇玩转[斗鱼直播APP]系列之界面分析 第三篇玩转[斗鱼直播APP]系列之项目部署 第四篇玩转[斗鱼直播APP]系列之获取APP图片资源 第五篇玩转[斗鱼直播APP]系 ...

  3. 第30月第18天 autolayout代码

    1.上下左右 [tipsLabel setTranslatesAutoresizingMaskIntoConstraints:NO]; { id view1 = tipsLabel; id view2 ...

  4. 第29月第18天 mac evpp环境

    1.boost https://github.com/Orphis/boost-cmake/ 2.evpp brew install libevent brew install glog /usr/l ...

  5. 第27月第18天 epoll lt et

    1. While the usage of epoll when employed as a level-triggered interface does have the same semantic ...

  6. 第26月第30天 srt

    1. ffmpeg -i 0.mp4 -vf subtitles=0.srt 1.mp4 https://jingyan.baidu.com/article/c45ad29c73cef2051653e ...

  7. 第26月第29天 ffmpeg yasm

    1. brew install automake fdk-aac git lame libass libtool libvorbis libvpx \ opus sdl shtool texi2htm ...

  8. 第26月第28天 avplayer cache

    1.urlsession https - (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticati ...

  9. 第26月第26天 Domain=AVFoundationErrorDomain Code=-11850

    1. curl -voa http://119.29.108.104:8080/inweb01/kotlin.mp4 -H "Range:bytes=0-1" https://al ...

随机推荐

  1. Django 异步化库celery和定时任务

    首先要了解Django其实是个同步框架,那么多个用户发送请求时就会发生排队的情况上一个用户的请求完成后在进行下一个,这样会对影响用户体验,所有就要用到异步方法来解决. 首先我们要安装celery库 p ...

  2. Flask 应用上下文

    应用上下文(application context) 它的字面意思是 应用上下文,但它不是一直存在的,它只是request context 中的一个对 app 的代理(人),所谓local proxy ...

  3. 记一次 HTTP信息头管理器使用 的重要性

    今天在测试中遇到了一个问题 使用JMeter时请求相关地址参数及方法都填写正确,但是相应数据返回始终不对,例如 查看取样器结果显示 200 正常,但响应数据不符合正常的结果. 经反复检查发现问题如下: ...

  4. NOIP 提高组 2014 飞扬的小鸟(记录结果再利用的DP)

    传送门 https://www.cnblogs.com/violet-acmer/p/9937201.html 参考资料: [1]:https://www.luogu.org/blog/xxzh242 ...

  5. python3: requests模块的使用;

    requests库常用于http请求,可以很方便对网页进行爬取: 主要方法(七个): 方法 解释 requests.request() 构造一个请求,支持以下各种方法 requests.get() 获 ...

  6. mysql数据库连接useSSL=true

    web应用中连接mysql数据库时控制台会出现这样的提示: Establishing SSL connection without server's identity verification is ...

  7. Object的数据属性和访问器属性

    一.数据属性 1.数据属性:它包含的是一个数据值的位置,在这可以对数据值进行读写. 2.数据属性包含四个特性,分别是: configurable:表示能否通过delete删除属性从而重新定义属性,能否 ...

  8. 网速测试脚本speedtest_cli的安装与使用

    speedtest_cli的安装与使用 1.下载 wget https://raw.github.com/sivel/speedtest-cli/master/speedtest.py 图 1 2.授 ...

  9. C#设计模式(14)——模板方法模式

    1.模板方法模式介绍 提到模板我们经常会想到简历模板/PPT模板等,以简历模板为例,不同的人可以使用一样的简历模板,在填充内容时根据自己的名字/工作经历等填写自己的内容,从而形成不同的简历.在OO中模 ...

  10. 关于PHP中会话技术的知识点分享

    前言:在PHP中会话技术也是特别重要的,主要应用在免登录,保存一些持久化数据等等的方面,但是后期的介绍中,我将会放弃这种技术改用redis方法来替换这种方法. (一)cookie技术(即数据缓存在客户 ...