spring boot手动提交事务

发布时间:2026/7/7 8:16:20
spring boot手动提交事务 Resource private TransactionTemplate transactionTemplate;public String updateVariableExpressionById(PcProjectVariableDTO params){try{transactionTemplate.execute(status-{//执行数据库逻辑returnOK;});}catch(Exception ex){throw new BusinessException(ex.getMessage());}returnOK;}