- 博客(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 251
原创 获取项目文件路径
springcloud/war项目: this.class.getResource(“”).getPath() //从当前文件所在目录查找。 this.class.getClassLoader().getResource(“”).getPath() //从项目根目录查找,即target/classes目录。 springboot/jar项目: 配置文件放置项目外固定目录,直接在项目中获取。 ...
2020-07-10 16:03:27 185
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人