问题描述:
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
解决方案:
除了query外的modiy和delete如果各层的方法中没有进行事务管理的话(没加@Transactional)话会报错,添加@Transactional注解即可。