|
|
@@ -3,6 +3,9 @@ package com.uas.ps.product;
|
|
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
import com.alibaba.fastjson.support.config.FastJsonConfig;
|
|
|
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
|
|
|
+import com.uas.ps.core.intercept.ExceptionHandlerAdvice;
|
|
|
+import com.uas.ps.core.intercept.WebLogAspect;
|
|
|
+import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.ComponentScan;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.http.MediaType;
|
|
|
@@ -40,4 +43,19 @@ public class WebAppConfiguration extends WebMvcConfigurerAdapter {
|
|
|
super.configureMessageConverters(converters);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 打印 HTTP 请求信息
|
|
|
+ */
|
|
|
+ @Bean
|
|
|
+ public WebLogAspect webLog() {
|
|
|
+ return new WebLogAspect();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 异常处理
|
|
|
+ */
|
|
|
+ @Bean
|
|
|
+ public ExceptionHandlerAdvice exceptionHandlerAdvice() {
|
|
|
+ return new ExceptionHandlerAdvice();
|
|
|
+ }
|
|
|
}
|