- 博客(2)
- 收藏
- 关注
原创 mysql事务验证
关闭事务自动提交set autocommit = 0;开始新事物start transaction;事物提交commit;排它锁(其他事务不能再加锁,不能读取修改,innodb快照读不影响)for update共享锁(其他事务可以再加共享锁,可以读取,不能修改)lock in share mode查看死锁show engine innodb status;查看锁等待时间show variables like ‘innodb_lock_wait_timeout’;设置锁等待时间s
2020-07-31 10:38:23 258
原创 获取项目文件路径
springcloud/war项目:this.class.getResource(“”).getPath() //从当前文件所在目录查找。this.class.getClassLoader().getResource(“”).getPath() //从项目根目录查找,即target/classes目录。springboot/jar项目:配置文件放置项目外固定目录,直接在项目中获取。...
2020-07-10 16:03:27 189
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人