java项目实战之Spring声明式事务利用运行时异常RuntimeException实现事务的回滚
首先来一段业务层事务的代码:@TransactionalpublicShopExecutionaddShop(Shopshop,ImageHolderthumbnail)throwsShopOperationException{//空值判断if(shop==null){returnnewShopExecution(ShopStateEnum.NULL_SHOP);}try{//给店铺信息赋初始值s