JPA using @SQLInsert throws Parameter index out of range
0
@Data @MappedSuperclass public class BaseModel implements Serializable { private static final Long serialVersionUID = -1442801573244745790L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Convert(converter = LocalDateTimeConverter.class) private LocalDateTime createAt = LocalDateTime.now(); @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Convert(converter = LocalDateTimeConverter.class) private LocalDateTime updateAt = LocalDateTime.now(); } @Data @Entity @Table(name = "tb_vip_code") @SQLInsert(sql = "insert ignore into tb_vip_code (code, duration) values (?, ?)") public class VipCode extends BaseModel { private static final Long serialVersionUID = -4697221755301869573L;