java - 如何在 spring-boot-starter-data-jpa 中配置 org.hibernate.cfg.Configuration
问题描述
我使用 spring-boot-starter-data-jpa,我想在 Hibernate 中注册一个自定义的 BasicType。
根据休眠文档,我需要 org.hibernate.cfg.Configuration 对象来注册。
configuration.registerTypeContributor( (typeContributions, serviceRegistry) -> {
typeContributions.contributeType( BitSetType.INSTANCE );
} );
但是在 spring-boot 中我不知道如何获取 org.hibernate.cfg.Configuration。
有谁知道该怎么做?
解决方案
推荐阅读
- angular - 在primeng p-toast中使用html
- javascript - 触发需要查找通过 AJAX 加载到页面中的元素的函数
- dom - 什么是 DOM 路径?
- python - 尝试使用 pandas 读取 sql 查询时出现“'NoneType' 对象不可迭代”错误
- python - Python - 在dict中用作“虚拟值”的最便宜的数据类型是什么
- react-native - 如何从一个菜单选项导航到另一个屏幕
- javascript - 如何在 where 子句 MongoDB 中传递参数值
- excel - EPPLUS - 表格增长后图表不更新
- ios - 在地图上模拟 iOS UI 测试的位置?
- postgresql - 如何确定是否通过 CASCADE 调用了触发器?