/*    */ package com.picc.grab.aop;
/*    */ 
/*    */ import com.picc.grab.common.shiro.ShiroExt;
/*    */ import com.picc.grab.config.SystemInfoProperties;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import org.aspectj.lang.ProceedingJoinPoint;
/*    */ import org.aspectj.lang.annotation.Around;
/*    */ import org.aspectj.lang.annotation.Aspect;
/*    */ import org.aspectj.lang.annotation.Pointcut;
/*    */ import org.slf4j.Logger;
/*    */ import org.slf4j.LoggerFactory;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.context.annotation.Configuration;
/*    */ import org.springframework.web.context.request.RequestAttributes;
/*    */ import org.springframework.web.context.request.RequestContextHolder;
/*    */ import org.springframework.web.context.request.ServletRequestAttributes;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ @Aspect
/*    */ @Configuration
/*    */ public class ServiceControllerAop
/*    */ {
/* 26 */   private static final Logger logger = LoggerFactory.getLogger(ServiceControllerAop.class);
/*    */   
/*    */   @Autowired
/*    */   private SystemInfoProperties systemInfoProperties;
/*    */ 
/*    */   
/*    */   @Pointcut("@annotation(com.picc.grab.aop.ServiceFtlPage)")
/*    */   public void excudeService() {}
/*    */ 
/*    */   
/*    */   @Around("excudeService()")
/*    */   public Object doAround(ProceedingJoinPoint pjp) throws Throwable {
/* 38 */     RequestAttributes ra = RequestContextHolder.getRequestAttributes();
/* 39 */     ServletRequestAttributes sra = (ServletRequestAttributes)ra;
/* 40 */     HttpServletRequest request = sra.getRequest();
/*    */     
/* 42 */     String uri = request.getRequestURI();
/*    */     
/* 44 */     Object result = pjp.proceed();
/*    */ 
/*    */     
/* 47 */     request.setAttribute("systemInfo", this.systemInfoProperties);
/*    */ 
/*    */     
/* 50 */     String ctrname = uri.replace("/", "");
/*    */     
/* 52 */     request.setAttribute("activeMenu", ctrname);
/*    */ 
/*    */     
/* 55 */     ShiroExt shiroExt = new ShiroExt();
/*    */     
/* 57 */     request.setAttribute("shiro", shiroExt);
/*    */     
/* 59 */     request.setAttribute("oneMenu", "myService");
/* 60 */     return result;
/*    */   }
/*    */ }


/* Location:              C:\Users\Administrator\Desktop\ROOT\WEB-INF\classes\!\com\picc\grab\aop\ServiceControllerAop.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */