In a Spring Boot application, the _____ annotation is used to demarcate transaction boundaries.

  • @Autowired
  • @Component
  • @Service
  • @Transactional
In a Spring Boot application, the @Transactional annotation is used to demarcate transaction boundaries. It is applied to methods, indicating that the method should be wrapped in a transaction, ensuring that either all operations within the method succeed or none of them do. This is crucial for maintaining data consistency in the database.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *