今天按文档里的jdk7的try-with-resource语法特性来使用NutTxDao,在catch里找不到tx
try(NutTxDao tx = new NutTxDao(Utils.getDao())) {
tx.beginRC();
tx.commit();
} catch (Exception e) {
tx.rollback();
} finally {
tx.close();
}
catch和finally里的tx都不认识