Closed pcyuen98 closed 3 years ago
@Service annotation can be applied only to classes. It is used to mark the class as a service provider that perform some service such as executing business logic, performing calculations and calling external APIs.
@Transactional Metadata that can be consumed by some runtime infrastructure. The scope of a single database transaction.
https://www.journaldev.com/21435/spring-service-annotation https://dzone.com/articles/a-guide-to-spring-framework-annotations
@Transactional A read-only flag — a hint for the persistence provider that the transaction must be read onlyThe rollback rules for the transaction
Explain the usages of the annotation below and provide reference link
@Service @Transactional