文章列表
错误:
Cannot release connection
org.hibernate.exception.GenericJDBCException: Cannot release connection
从异常分析,造成这个异常 org.hibernate.exception.GenericJDBCException: Cannot release connection 归根结底是Caused by: java.sql.SQLException: Already closed. 即连接已关闭。所以解决的办法就要从DBCP的参数配置入手,我在DB_XXXX.properties 增加以下 ...
SimpleDateFormat df=new SimpleDateFormat("yyyy-MM");
Calendar cal = Calendar.getInstance();
// 取得前三个月的时间
cal.add(Calendar.MONTH, 0);
System.out.println(df.format(cal.getTime()));
cal.add(Calendar.MONTH, -1);
System.out.println(df.format(cal.getTime()) );
c ...