原创 mybatis類型轉換。TypeHandler案例
配置 mybatis-plus: configuration: map-underscore-to-camel-case: true cache-enabled: false global-config:
原创 Mybatis-plus-join使用、mybatis連表
public interface PlanDayMapper extends MPJBaseMapper<PwPlanDayPO> { } MPJLambdaWrapper<PwPlanDayPO> wrapper
原创 mybatis打印日誌
mybatis-plus: configuration: #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl map-underscore-to-camel-c
原创 jpa打印sql與參數
logging: level: org: hibernate: SQL: DEBUG type: descriptor: sql:
原创 jpa排除字段
@Transient直接忽略 新增和修改忽略 @Column(name ="`exc_status`", insertable = false, updatable = false) @A
原创 jna獲取windos所有窗口
<dependency> <groupId>net.java.dev.jna</groupId> <artifactId>jna</artifactId>
原创 使用Thumbnails進行圖片壓縮,報“No suitable ImageReader found for source data”異常處理。
先轉一次byte數組 再處理byte[] bigContent =file.getBytes(); Thumbnails.of(new ByteArrayInputStream(bigConten
原创 mybatis非數據字段註解@TableField(exist=false)註解
mybatis非數據字段註解@TableField(exist=false)註解 不是數據庫字段
原创 @SneakyThrows註解報錯Java: 未報告的異常錯誤
去掉了lombok版本號,那麼SpringBoot2.5.4版本默認使用的是lombok的1.18.20。然後執行代碼,一切正常,問題解決了。
原创 Nacos啓動報錯:Please set the JAVA_HOME variable in your environment, We need java(x64) jdk8 or later
要麼配置了多個java環境變量,要麼就是沒有配置java環境變量、配置完環境變量需要重啓電腦
原创 全局處理long類型精度丟失返回前端問題,fastjson
@Bean public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() { Map<Class<
原创 SpringBoot項目啓動失敗報錯Annotation-specified bean name ‘xx‘ for bean class [xxx] conflicts with existing
Annotation-specified bean name 'datahubServiceImpl' for bean class [com.peony.common.service.impl.DatahubServiceImpl] co
原创 Redis報錯:WRONGTYPE Operation against a key holding the wrong kind of value 解決處理
redis內存在數據類型與你取數據的類型不匹配 ,比如你存的數據是鍵值對字符串 ,然後你使用list類型的方法去獲取數據