Ошибка mybatis: ошибка произошла при настройке параметров [закрыто]JAVA

Программисты JAVA общаются здесь
Anonymous
Ошибка mybatis: ошибка произошла при настройке параметров [закрыто]

Сообщение Anonymous »

Я использую следующий скрипт в mybatis xml Mapper: < /p>

Код: Выделить всё

insert into note (id , text)
values

#{note.id}, #{note.text}

on conflict (id)
do update set
text = excluded.text

с параметром, определенным как в этой подписи: void upsert (@param ("notes") list Примечания);
и заметки pojo defined as:

@Data
@Builder
public class Note {
private Long id;
private String text;
}
< /code>
Но я получаю ошибку: < /p>

Код: Выделить всё

### The error occurred while setting parameters
### SQL: insert into note (id , text)         values          (               ?, ?          ),,(              ?, ?          )        on conflict (id)         do update set             text = excluded.text
### Cause: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
; uncategorized SQLException; SQL state [25P02]; error code [0]; ERROR: current transaction is aborted, commands ignored until end of transaction block]
2025-10-02T14:31:52.950+04:00 ERROR 60407 --- [     executor-1] r.c.c.b.service.LocationDatabaseService  : Something goes wrong on media initialization
< /code>
База данных - PostgreSQL 16, Mybatis импортируется из этой версии
org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.2
Как это решить?

Подробнее здесь: https://stackoverflow.com/questions/797 ... parameters

Вернуться в «JAVA»