1.编程式事务
DefaultTransactionDefinition def = new DefaultTransactionDefinition();
def.setPropagationBehavior(DefaultTransactionDefinition.PROPAGATION_REQUIRED);
def.setTimeout(3000);
TransactionStatus status = transactionManager.getTransaction(def);
//TODO : 业务逻辑代码,入库之类的
transactionManager.commit(status);