Which two are required to use transactions in Spring? (Choose two.)
Which two are required to use transactions in Spring? (Choose two.)
To use transactions in Spring, it is necessary to enable transaction management and specify which methods or classes should be transactional. This can be achieved by adding @EnableTransactionManagement to a Java configuration class to activate the transaction management capabilities of Spring. Furthermore, the @Transactional annotation is used to mark the classes, interfaces, or individual methods which should participate in a transaction.
Need 2 things: @EnableTransactionManagement and @Transactional .
A: You have to enable transaction management. B: You choose which methods/classes will be treated as transactional by using the @Transactional annotation.