The emperor as the object, eunuch as IOC container, when the emperor to choose the concubine to sleep at night, do not have to take care of, as long as to the bed. Eunuchs are fond of according to the emperor (find corresponding dependence or other objects), find the corresponding concubine sent to the emperor bed.
Declarative transaction management is based on AOP. The essence is to intercept before and after the method, then create or join a transaction before the target method starts, and commit or roll back the transaction after the target method is executed. The biggest advantage of declarative transactions is that they do not need to be managed programmatically. This means that you do not need to mix transaction management code with your business logic code. Instead, you can apply transaction rules to your business logic by declaring them in a configuration file (or by using the @Transactional annotation).