When spring boot udpate delete data, the transaction management reports an error

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

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

The reason is that in the business method of update delete operation, there is a service without @ transaction annotation

Only in the business method of new operation, some services are not annotated and will not report an error

Question: will all of the update and delete involved in this way be in the same thing?How to refine the modification and update of the whole business

Similar Posts: