当你自定义一个删除的delete方法时,不加事务注解,报错

报错:cannot reliably process 'remove' call

要用的注解:

    @Modifying
    @Transactional
int deleteUserByUserName(String username);

 

参考:

jpa 报错:No EntityManager with actual transaction available for current thread - cannot reliably proce_Wu_______的博客-CSDN博客_cannot reliably process 'remove' call

posted on 2023-01-09 11:48  影子BLH  阅读(161)  评论(0)    收藏  举报