In the project I'm in Hibernate and Spring jdbctemplate are mixed. I added optimistic locking. Hibernate works great with versioning but now I have to tansform all this jdbctemplate code to use versioning too.
Is there something like LockingJdbcTemplate (like SimpleJdbcTemplate)? I was thinking I could implement a generic update method
update(String tableName, String columnsSql, String whereSql, Long version, Object... params)
Where I could:
Is there any library that would wrap jdbctemplate and do something similar for me? Don't want to invent something that exists... :)
不,您必须手动将乐观锁定行为添加到更新查询中。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.