CoinExchange_CryptoExchange_Java icon indicating copy to clipboard operation
CoinExchange_CryptoExchange_Java copied to clipboard

Suggestions about @Transactional annotation usage

Open WilliamSESE opened this issue 4 years ago • 0 comments

Hi, I found that there may be some minor improvements about annotations in your code.

By adding @Transactional at the class level, many important aspects such as transaction propagation can be handled automatically. It can wrap your service in a generated proxy that joins an active transaction or starts a new one and commits or rolls the transaction back after your methods got executed.

Based on the advantages mentioned above, I recommend that you add the @Transactional annotation at the class level.

Hope my suggestions are useful!

WilliamSESE avatar Aug 18 '21 12:08 WilliamSESE