WARN o.s.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver -Resolved [org.springframework.dao.InvalidDataAccessApiUsageException: No EntityManager with actual transaction available for current thread - cannot reliably process 'remove' call; nested exception is javax.persistence.TransactionRequiredException: No EntityManager with actual transaction available for current thread - cannot reliably process 'remove' call]
报错原因:是因为没加事物,所以导致无法安全的删除成功。在service层的该方法头加上事物注解 @Transactional就解决了