http://www.itread01.com/articles/1476208207.html 一、打開Tomcat/conf/context.xml文件,在標簽 </ 中加入如下內容: auth="Container" type="Javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" ADVERTISEMENT url="jdbc:mysql://localhost:3306/testDBS?autoReconnect=true&useUnicode=true&characterEncoding=UTF8" username="root" password="root、" maxActive="100" ADVERTISEMENT maxIdle="30" maxWait="10000" /> 參數說明如下: 1)...
發表文章
目前顯示的是 8月, 2017的文章
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式
转 spring 配置 datasource 三种方式 http://zyc1006.iteye.com/blog/1339719 博客分类: HibernateSpring springhibernate 本文来自 CSDN 博客,转载请标明出处: http://blog.csdn.net/tl396900/archive/2010/04/09/5467086.aspxhttp://www.linuxso.com/architecture/15550.html 1, 使用 org.springframework.jdbc.datasource.DriverManagerDataSource 说明: DriverManagerDataSource 建立连接是只要有连接就新建一个 connection, 根本没有连接池的作用。 ${jdbc.driverClassName} ${jdbc.url} ${jdbc.username} ${jdbc.password} 2. 使用 org.apache.commons.dbcp.BasicDataSource 说明 : 这是一种推荐说明的数据源配置方式,它真正使用了连接池技术 ...