
spring
遇见下一个自己
这个作者很懒,什么都没留下…
展开
-
欢迎使用优快云-markdown编辑器
1.在SpringMVC.xml中添加配置:<!-- 自定义拦截器(映射到Controller中的方法级别)--> <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"> <property name="webBindi原创 2016-07-05 11:31:51 · 443 阅读 · 0 评论 -
spring mvc 使用拦截器interceptor和自定义Log类实现持久层记录日志
首先spring记录日志我所知道的有两种,一种是通过AOP,另一种是通过拦截器interceptor,我这次选择的是拦截器interceptor: 1.spring-mvc.xml文件中配置拦截器, <!-- 装配拦截器 --> <mvc:interceptors> <mvc:interceptor> <mvc:mapping path="/**/*原创 2017-03-17 18:14:46 · 6357 阅读 · 0 评论