报错信息:
Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: com.sifang.web.devicehealthanalysis.model.mapper.TypeDeviceMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: errCode = 2, detailMessage = Unknown table 'type_device'
注释的saveBatch报错,找不到type_device表。
试了试save,好使的。
观察表结构,发现这张表没有id。不知道有没有关系?
2024-05-13
已验证,和表没有id没有关系。
正确原因如下:
数据库配置如下:
#数据库配置信息
datasource:
dynamic:
strict: true
lazy: false
primary: cdf
datasource:
master:
url: jdbc:postgresql://192.178.10.46:5432/postgres?currentSchema=cdf
username: postgres