一、配置文件的分工 spring配置文件: 1、配置扫描包,排除Controller、ControllerAdvice 2、导入属性文件 3、数据库连接池的数据源 4、配置事务管理器(datasource属性) 5、开启基于注解的事务<tx:annotation-driven transaction ...
分类:
其他好文 时间:
2018-01-18 11:49:57
阅读次数:
170
1.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [applicationConte ...
分类:
其他好文 时间:
2018-01-14 15:16:38
阅读次数:
320
一、在tomcat conf目录下的context.xml文件里的Context标签下添加如下配置<Resource name="jdbc/news" auth="Container" type="javax.sql.DataSource"maxActive="100" maxIdle="30" m ...
分类:
数据库 时间:
2018-01-12 17:44:48
阅读次数:
141
实现数据库连接池步骤如下: 1.配置/Tomcat安装目录/conf/context.xml文件。 <Resource name="jdbc/news" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="10" ...
分类:
数据库 时间:
2018-01-09 21:19:06
阅读次数:
183
grdView.DataSource = Select().Skip(pageSize * (start - 1)).Take(rows).ToList();这个分页性能上并不高下面是我的分页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ...
分类:
其他好文 时间:
2018-01-04 10:57:53
阅读次数:
466
servlet与线程与jdbc connection的关系 都是一一绑定的关系, servlet接受那么多此请求。 一个请求,对应一个线程,对应一个DB POOL的connection。 因为connection不是线程安全的。 datasource pool也是利用jdbc driverManag ...
分类:
数据库 时间:
2017-12-31 14:42:55
阅读次数:
209
Use AbstractRoutingDataSource to dynamicly switch datasources, see http://spring.io/blog/2007/01/23/dynamic-datasource-routing. PS: note the use of Th ...
分类:
编程语言 时间:
2017-12-29 15:11:52
阅读次数:
135
web.xml文件配置 配置springMVC:扫描包,解析器,加载静态功能和注解功能 配置spring文件:扫描包,配置dataSource,配饰japEntityFactory等等..jpa的基本配置,事务,jpa管理器,springData ...
分类:
编程语言 时间:
2017-12-19 20:02:42
阅读次数:
266
尊重原创(原文链接):http://blog.csdn.net/kunkun378263/article/details/8506355 1、使用org.springframework.jdbc.datasource.DriverManagerDataSource 说明:DriverManagerD ...
分类:
数据库 时间:
2017-12-15 00:49:32
阅读次数:
249