|
|
@ -5,11 +5,13 @@ import org.aspectj.lang.ProceedingJoinPoint; |
|
|
|
import org.aspectj.lang.annotation.Around; |
|
|
|
import org.aspectj.lang.annotation.Aspect; |
|
|
|
import org.springframework.core.annotation.Order; |
|
|
|
import org.springframework.core.env.Environment; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.web.context.request.RequestAttributes; |
|
|
|
import org.springframework.web.context.request.RequestContextHolder; |
|
|
|
import org.springframework.web.context.request.ServletRequestAttributes; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
|
|
|
/** |
|
|
@ -20,10 +22,14 @@ import javax.servlet.http.HttpServletRequest; |
|
|
|
@Order(0) |
|
|
|
public class RequestLogAspect extends BaseRequestLogAspect { |
|
|
|
|
|
|
|
@Resource |
|
|
|
private Environment env; |
|
|
|
|
|
|
|
@Override |
|
|
|
@Around(value = "execution(* com.epmet.modules.*.controller.*Controller*.*(..)) ") |
|
|
|
@Around(value = "execution(* com.epmet.plugin.power.modules.*.controller.*Controller*.*(..)) ") |
|
|
|
public Object proceed(ProceedingJoinPoint point) throws Throwable { |
|
|
|
return super.proceed(point, getRequest()); |
|
|
|
String appName = env.getProperty("spring.application.name"); |
|
|
|
return super.proceed(point, getRequest(), appName); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|