-
分享一个利用sharding shpere(jdbc)实现的分库分表源码
在分布式开发中,某些表数据量比较大时,通常会选择分库分表作为解决方案。常用的中间件有mycat, sharding jdbc等。由于sharding jdbc比较轻量,而且是在客户端做的分库分表,使用起来比较方便。所以我也用sharding jdbc 做了一个例子。后面有源码下载。
Date: 2020-04-11 View: 1520
-
java jdbc连接各种数据库的方式大全
Java Database Connectivity (JDBC),用来与数据库打交道,本文主要总结了 jdbc与mysql,oracle,postgresql 连接的方式,并总结了 Statement, PreparedStatement , CallableStatement 以及事务 JDBC Transaction 的处理
Date: 2012-12-06 View: 1520
-
JdbcTemplate queryForInt() is Deprecated
Upgrading Spring version and noticed that queryForInt() is deprecated, what should be replaced by?
Date: 2019-08-18 View: 1520
-
queryForObject() throws EmptyResultDataAccessException when record not found
Reviewing a legacy project, and found this Spring JDBC code snippets :
Date: 2019-08-17 View: 1520
-
How to autowire DataSource in JdbcDaoSupport
A Simple DAO class extends JdbcDaoSupport, but, unable to inject or @autowired a “dataSource”, the method setDataSource is final, can’t override.
Date: 2019-08-17 View: 1520
-
Spring Boot JDBC + MySQL + HikariCP example
In this article, we will show you how to create a Spring Boot JDBC application + MySQL and HikariCP.
Date: 2019-08-11 View: 1520
-
MySQL Establishing SSL connection without servers identity verification is not recommended
Start a Spring Boot application and making a JDBC connection, hits the following warning messages on console :
Date: 2019-08-11 View: 1520
-
Spring Boot JDBC + Oracle database + Commons DBCP2 example
In this article, we will show you how to create a Spring Boot JDBC application + Oracle database + Commons DBCP2 connection pool.
Date: 2019-08-11 View: 1520
-
HikariPool-1 Connection is not available, request timed out after 30002ms.
After some SQL queries, the system is unable to get any connection from the HikariPool and prompts the following error message
Date: 2019-08-11 View: 1520
-
JDBC PreparedStatement SQL IN condition
Java JDBC PreparedStatement example to create a SQL IN condition.
Date: 2019-08-11 View: 1520
-
JDBC How to print all table names from a database?
A JDBC example to connect to a PostgreSQL, and print out all the tables from the default database postgres
Date: 2019-08-11 View: 1520
-
JDBC Class.forName() is no longer required
Since Java 1.6, JDBC 4.0 API, it provides a new feature to discover java.sql.Driver automatically, it means the Class.forName is no longer required. Just put any JDBC 4.x driver in the project classpath, and Java is able to detect it.
Date: 2019-08-11 View: 1520
-
JDBC CallableStatement PostgreSQL Stored Function
A JDBC CallableStatement example to show you how to call a stored function from PostgreSQL database.
Date: 2019-08-11 View: 1520
-
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
This is caused by the requested SID doesn’t exist in {ORACLE_HOME}/network/admin/tnsnames.ora
Date: 2019-08-11 View: 1520
-
java.sql.SQLException: operation not allowed: Ordinal binding and Named binding cannot be combined!
Ordinal binding or index binding:
Date: 2019-08-11 View: 1520