1234567891011121314151617181920212223242526272829303132333435 |
- package com.lantone.security.aop;
- import com.lantone.security.component.MessageSender;
- import org.aspectj.lang.annotation.After;
- import org.aspectj.lang.annotation.Aspect;
- import org.aspectj.lang.annotation.Pointcut;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Component;
- /**
- * @Description: 系统字典信息变更统一处理切面
- * @author: rengb
- * @time: 2021/8/26 10:43
- */
- @Aspect
- @Component
- public class DictionaryAspect {
- @Autowired
- private MessageSender messageSender;
- @Pointcut("execution(public * com.lantone.security.web.UserManagementController.login(..))")
- private DictionaryInfoFacade dictionaryInfoFacade;
- @Pointcut("execution(public * com.lantone.security.web.DictionaryManagementController.addDictionary(..))" +
- "||execution(public * com.lantone.security.web.DictionaryManagementController.updateDictionary(..))" +
- "||execution(public * com.lantone.security.web.DictionaryManagementController.deleteDictionary(..))")
- public void basicInfoChange() {
- }
- @After("basicInfoChange()")
- public void aspectAfter() {
- messageSender.sendRedisCacheRefreshMessage(DictionaryAspect.class.getSimpleName());
- }
- }
|