int deleteById(Integer id); 我用的 jpa 报错 最后发现没有加 @Transactional 正确写法: @Transactional int deleteById(Integer id);