摘要:
redis config 根据value和hashvleus的序列化方式不同 我遇到收集了多种配置类 1、string 2、json 3、还有JdkSerializationRedisSerializer是jdk序列化方式,实体类要实现序列化接口 @Configuration public clas 阅读全文
posted @ 2021-11-17 13:43
沉梦匠心
阅读(115)
评论(2)
推荐(0)
摘要:
项目升级为SpringBoot工程。底层封装了很多业务逻辑,短时间无法迁移到其他持久化框架。 所以分两步,先使用Hibernate过渡,然后再进行其他的迁移。 迁移的过程中,发现sessionFactory无法注入! 最后找到的方法是,在BaseDaoImpl中配置如下信息: @Autowired 阅读全文
posted @ 2021-11-17 09:15
沉梦匠心
阅读(765)
评论(0)
推荐(0)
摘要:
参考:https://www.jianshu.com/p/fc2c79814956 驼峰与下划线的转化 通用配置: 无修改命名 spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.Physical 阅读全文
posted @ 2021-11-17 09:14
沉梦匠心
阅读(556)
评论(0)
推荐(0)
摘要:
1、Spring5的坑:Could not obtain transaction-synchronized Session for current thread 2、spring boot + jpa报错:No CurrentSessionContext configured https://blo 阅读全文
posted @ 2021-11-17 09:14
沉梦匠心
阅读(640)
评论(0)
推荐(0)
摘要:
在从 5.1 升到 5.2及以上 时遇到这个问题了 像是嵌套事务问题 Caused by: javax.persistence.TransactionRequiredException: no transaction is in progress at org.hibernate.internal. 阅读全文
posted @ 2021-11-17 09:11
沉梦匠心
阅读(2460)
评论(0)
推荐(0)

浙公网安备 33010602011771号