Transactions, Spring.
getUser(String id) { // DB call } } When the UserService is Autowired in any controller / other classes, a proxy of UserService is created and used by those classes. This is illustrated in the diagram below In a nutshell, 1.If Spring detects the @Transactional annotation on a bean, it creates a