摘要:
1、序列 以自增serial类型主键的序列: alter sequence s_seq restart with 1; #重置序列select currval('tablename_pid_seq');select nextval('tablename_pid_seq');select setval 阅读全文
摘要:
1、pom.xml文件 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> </dependency> <dependency> <gro 阅读全文
摘要:
1、代码实现 浏览器调用: http://localhost:8888/ 返回如下内容: 阅读全文
摘要:
1、枚举多数据源-定义一一对应变量 /** * * 列出所有的数据源key(常用数据库名称来命名) * 注意: * 1)这里数据源与数据库是一对一的 * 2)DatabaseType中的变量名称就是数据库的名称 */ public enum DatabaseType { test1,test2} 2 阅读全文
摘要:
1、问题 testOnBorrow=false导致获取连接cloes_wait 。 http://commons.apache.org/proper/commons-dbcp/configuration.html 官方dbcp配置 org.apache.tomcat.jdbc.pool.DataSo 阅读全文