- 博客(9)
- 收藏
- 关注
原创 jpa entity oracle @Lob 大字段插入报错,无效的列类型
jpa entity oracle数据库中 @Lob 大字段插入数据时报错,无效的列类型需增加注解 @Type(type = "org.hibernate.type.TextType") 可解决。@Lob@Type(type = "org.hibernate.type.TextType")@Column(name = "test" )private String test;该写法可直接兼容postgre数据库...
2022-05-27 13:42:26
718
原创 jpa Specification fetch查询报错,query specified join fetching, but the owner of the fetched association
jpa Specification fetch查询报错,query specified join fetching, but the owner of the fetched association was not present in the selectjpa Specification fetch查询报错,query specified join fetching, but the owner of the fetched association was not present in the sele
2022-05-19 16:58:57
1195
原创 2021/12/7 记录一个cpu爆满卡死的问题
2021/12/7 记录一个cpu爆满卡死的问题1、启动项目注入serv空指针问题最近在项目启动后遇到一个问题, @Bean public WebSocketClient webSocketClient() { // 加载数据库数据到缓存中 scadaData.restartAddCache(); try { WebSocketClient webSocketClient = new WebSocketClient(new
2021-12-07 17:12:16
802
原创 2021 -11 -4 io.shardingsphere 3.0版本问题记录
在jpa+spring boot + shardingsphere + postgre 中,使用EntityManager复制表结构时报错 shardingsphere3.0 报错使用as 关键字复制表结构@PersistenceContext private EntityManager entityManager; String sql = "create table " + tableName + " as select * from" + tableType;
2021-11-04 11:13:09
989
原创 2021-11-03 使用shardingsphere后,jpa中的offset语句出现问题(postgre)
使用shardingsphere后,jpa中的offset语句出现问题(postgre)使用的shardingsphere依赖为 <dependency> <groupId>io.shardingsphere</groupId> <artifactId>sharding-jdbc-spring-boot-starter</artifactId> <version>
2021-11-03 16:58:40
741
原创 2021-10-20 springboot、sharding-jdbc、jpa、bootstrap.yml、postgre 实现分表
springboot、sharding-jdbc、jpa、bootstrap.yml、postgre 实现分表sharding-jdbc 使用YAML配置首先调通jpa、项目结构如下pom引入包bootstrap设置文件代码注意事项使用sharding-jdbc,在启动项目后需要手动删除jpa创建的表。并手动创建按照设定逻辑分出的表。必须在合适的地方(项目启动的某时刻)删除jpa创建的表。才能正确匹配规则,将新数据存入设定好的匹配规则中。且必须使得所有分表使用同一主键序列sharding-jdbc 使用Y
2021-10-20 17:14:36
552
1
原创 2021-08-11 feign获取JSONObject数据后的处理
feign获取JSONObject数据后的处理先写两个获取解析结果的类@Datapublic class HttpResponse<T> { private String msg; private Integer code; private HttpResult<T> result; public T getData() { if (null != result) { return result.ge
2021-08-11 11:11:27
767
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人