我有一个带有事务注释的类:
@Service
@EnableTransactionManagement(order=2000)
public class UserManagementServiceImpl implements UserManagementService {
@Transactional
public User addUser(User user) throws AlreadyExistException {
// ...
}
}
我有一个方面类:
@Component
@Aspect
public class PublisherAspect {
@Around("execution(* com.toi.expresso.service.UserManagementService.addUser(..))")
public User publishAddUserEvent(ProceedingJoinPoint jp) {
// ...
}
}
在将数据保存在数据库中之前,我的@Around
注释正在执行。addUser
请建议我@Around
将数据保存到数据库后如何执行。