数据库异常处理
zhgo116
居天下之广居,立天下之正位,行天下之大道。得志,与民由之,不得志,独行其道.
展开
-
亲测解决myabtis中驼峰命报错:Property ‘configuration‘ and ‘configLocation‘ can not specified with together的解决办法
报错是因为驼峰命名属于mybatis配置内容,如果你指定了mybatis的配置文件,他就认为你应该在配置文件中设置,而不是两边都配置驼峰。 application.yml文件指定mybatis全局配置文件, mybatis-config.xml文件中配置开启驼峰配置 application.yml文件中mybatis的配置 mybatis: typeAliasesPackage: com.example.mybaitsxml.dao.entity mapperLoc..原创 2020-07-31 13:53:16 · 549 阅读 · 0 评论 -
spring事务——try{...}catch{...}中事务不回滚的几种处理方式
当希望在某个方法中添加事务时,我们常常在方法头上添加@Transactional注解 @ResponseBody @RequestMapping(value = "/payment", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) @Transactional public Payment p...原创 2020-05-08 15:12:55 · 1320 阅读 · 0 评论