Comments (2)
spring xml 改造
原来配置方法
<!-- MonitorInterceptor 主要在log里面输出耗时时间 -->
<mvc:interceptor>
<!-- 默认所有 -->
<!-- json请求不排除 -->
<mvc:mapping path="/**" />
<bean class="com.feilong.spring.web.servlet.interceptor.monitor.MonitorInterceptor">
<!-- 性能阀值,单位毫秒 -->
<property name="performanceThreshold" value="2000" />
<property name="requestLogSwitch">
<util:constant static-field="com.feilong.servlet.http.entity.RequestLogSwitch.NORMAL_WITH_IDENTITY_INCLUDE_FORWARD" />
</property>
<!-- 允许被json log输出的 request&&model 对象类型, 默认只有基本类型以及数组才会被输出. -->
<property name="allowFormatClassTypes">
<array>
<value>com.feilong.web.command.ViewCommand</value>
</array>
</property>
</bean>
</mvc:interceptor>
改成
<!-- MonitorInterceptor 主要在log里面输出耗时时间 -->
<mvc:interceptor>
<!-- 默认所有 -->
<!-- json请求不排除 -->
<mvc:mapping path="/**" />
<bean class="com.feilong.spring.web.servlet.interceptor.monitor.MonitorInterceptor">
<property name="monitorMessageEntity">
<bean class="com.feilong.spring.web.servlet.interceptor.monitor.MonitorMessageEntity"><!-- 性能阀值,单位毫秒 -->
<property name="performanceThreshold" value="2000" />
<property name="requestLogSwitch">
<util:constant static-field="com.feilong.servlet.http.entity.RequestLogSwitch.NORMAL" />
</property>
<!-- 允许被json log输出的 request&&model 对象类型, 默认只有基本类型以及数组才会被输出. -->
<property name="allowFormatClassTypes">
<array>
<value>com.feilong.web.command.ViewCommand</value>
</array>
</property>
</bean>
</property>
</bean>
</mvc:interceptor>
并且加上 <property name="isShowRequestAttribute" value="false" />
<bean class="com.feilong.spring.web.servlet.interceptor.monitor.MonitorMessageEntity"><!-- 性能阀值,单位毫秒 -->
<property name="performanceThreshold" value="2000" />
<property name="isShowRequestAttribute" value="false" />
<property name="requestLogSwitch">
<util:constant static-field="com.feilong.servlet.http.entity.RequestLogSwitch.NORMAL" />
</property>
<!-- 允许被json log输出的 request&&model 对象类型, 默认只有基本类型以及数组才会被输出. -->
<property name="allowFormatClassTypes">
<array>
<!-- <value>com.feilong.web.command.ViewCommand</value> -->
</array>
</property>
</bean>
from feilong-spring.
<property name="isShowRequestAttribute" value="false" />
<property name="isShowPostHandleLog" value="false" />
<property name="isShowAfterCompletionLog" value="false" />
<property name="isShowAfterConcurrentHandlingStartedLog" value="false" />
加上了4个属性
16:00:26 DEBUG (MonitorInterceptor.java:87) doPreHandle() - [Request] base info: {
"requestFullURL": "http://127.0.0.1:8092/pay/notifyError.htm?type=1",
"requestMethod": "GET",
"parameters": {"type": ["1"]}
} ,start StopWatch
16:00:26 DEBUG (MemberDetailsInterceptor.java:91) preHandle() - Request don't need Login: /pay/notifyError.htm
16:00:26 DEBUG (LoginSessionBindInterceptor.java:87) preHandle() - {
"requestFullURL": "http://127.0.0.1:8092/pay/notifyError.htm?type=1",
"requestMethod": "GET",
"parameters": {"type": ["1"]}
}
16:00:26 DEBUG (LoginSessionBindInterceptor.java:94) preHandle() - session is null,return true
16:00:26 INFO (ResultNotifyErrorController.java:66) doNotifyError() - {
"requestFullURL": "http://127.0.0.1:8092/pay/notifyError.htm?type=1",
"requestMethod": "GET",
"parameters": {"type": ["1"]}
}
16:00:26 DEBUG (ClientCacheInterceptor.java:184) setNoCacheAndLog() - [ResultNotifyErrorController.doNotifyError()],setNoCacheHeader,cause by: [isDefaultNoCache:[true]]
16:00:26 WARN (DispatcherServlet.java:1116) noHandlerFound() - No mapping found for HTTP request with URI [/] in DispatcherServlet with name 'springmvc'
16:00:26 WARN (DispatcherServlet.java:1116) noHandlerFound() - No mapping found for HTTP request with URI [/errors/404400] in DispatcherServlet with name 'springmvc'
from feilong-spring.
Related Issues (20)
- 修改 顶级项目的artifactId 为feilong-spring-parent
- 删除 feilong-spring-context-support-mail
- 删除 feilong-spring-jdbc
- AbstractContextRefreshedHandlerMethodLogginEventListener 默认输出所有路径到 userhome
- ContextRefreshedHandlerMethodInfoEventListener 输出的 cvs true false 不可读
- SpelUtil 移动到 feilong
- WebSpringUtil 移动到 feilong
- spring 升级到 5
- spring-security 升级到 5.3.2.RELEASE
- 修改 group id以便准备发**仓库 HOT 1
- 升级 quartz 2.3.2
- ContextRefreshedHandlerMethodInfoEventListener 要支持输出 produces等参数 HOT 1
- ViewCommand 和 SubViewCommand 移动到 feilong spring项目
- 移除对spring 的直接依赖
- 升级feilong 到3.4.1
- java.lang.NullPointerException: null HandlerMethodInfoExtractor
- 有两个 requestMappingHandlerMapping HOT 1
- 升级feilong parent 到3.5.0
- requestmapping 生成的cvs 把方法返回值类型输出出来,方便统计这个方法是否有声音输出
- 升级feilong到3.5.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feilong-spring.