1. 声明式事务管理(3步) (1)在xml配置文件中声明事务管理器 <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property n ...
分类:
编程语言 时间:
2017-10-13 23:52:55
阅读次数:
188
Commons Configutation commons configuration可以很方便的访问配置文件和xml文件中的的内容。Commons Configuration 是为了提供对属性文件、XML文件、JNDI资源、来自JDBC Datasource数据的访问。 官方文档:http://c ...
分类:
其他好文 时间:
2017-10-10 20:44:13
阅读次数:
237
异常截图 》 快速解决方式==》 在SpringBoot的启动类上面添加注解:@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class}) 原理:springboot是约定大于配置的,它会默认加载dataSource ,如 ...
分类:
数据库 时间:
2017-10-10 13:11:03
阅读次数:
835
[root@ms1 conf]# mysql -uroot -pchengce243 -h192.168.56.56 -P8066Warning: Using a password on the command line interface can be insecure.Welcome to th ...
分类:
编程语言 时间:
2017-10-07 14:41:26
阅读次数:
2538
DataSet和DataTable区别 da.Fill(ds, "alias_1"); //使用DataAdapter的Fill方法(填充),调用SELECT命令,别名 dataGridView8.DataSource = ds.Tables[0]; da.Fill(dt); //直接填充给dt f... ...
分类:
其他好文 时间:
2017-10-05 10:56:30
阅读次数:
183
1、首先配置JdbcTemplate 在 Spring 的 IOC 容器中配置一个 JdbcTemplate 的 bean,将 DataSource(使用第三方数据源c3p0) 注入进来,然后再把JdbcTemplate 注入到自定义DAO 中。 2、在自定义Dao类中配置如下,为private J ...
分类:
数据库 时间:
2017-10-03 11:25:24
阅读次数:
193
dao层类UserDaoImpl继承JdbcDaoSupport并且取消该类上的注解,将之前temp对象改写成getJdbcTemplate(),其次在Spring的IOC容器中配置UserDaoImpl的bean,并把DataSource注入进来 全局配置文件beans.xml如下: UserDa ...
分类:
数据库 时间:
2017-10-03 11:22:27
阅读次数:
260
1. 当控件被数据绑定时,无法以编程方式向 DataGridView 的行集合中添加行 解决方法:((DataTable)Dgv.DataSource).Rows.Add("", "");需添加行的数据 2.无法将类型为“System.Collections.Generic.List`1[Model ...
分类:
其他好文 时间:
2017-09-30 11:34:58
阅读次数:
478
packageutil;importjava.sql.Connection;importjava.sql.ResultSet;importjava.sql.SQLException;importjava.sql.Statement;importjavax.sql.DataSource;importcom.mchange.v2.c3p0.ComboPooledDataSource;publicclassJDBCUtils{ privatestaticDataSourcedataSource=null; stat..
分类:
数据库 时间:
2017-09-29 00:26:50
阅读次数:
185
上周Spark1.2刚发布,周末在家没事,把这个特性给了解一下,顺便分析下源码,看一看这个特性是如何设计及实现的。 /** Spark SQL源码分析系列文章*/ (Ps: External DataSource使用篇地址:Spark SQL之External DataSource外部数据源(一)示 ...
分类:
数据库 时间:
2017-09-26 14:51:10
阅读次数:
207