2018年9月2日
摘要: @EventListener是spring在4.2+推出的更好的使用spring事件架构的方式,并且异步方式也很好设定 但是在spring4.2.7版本上使用eventlistener的condition 的使用需要注意以下情况可能失效: condition 使用例子如@EventListener( 阅读全文
posted @ 2018-09-02 00:56 小石头的一天 阅读(3440) 评论(0) 推荐(0)
摘要: 在SpringMVC的源代码中也提供了一个封装过的ThreadLocal,其中保存了每次请求的HttpServletRequest对象,(详细请看org.springframework.web.context.request.ServletRequestAttributes的源代码) 。 这样我们就可以进行简单封装一下写一个工具进行使用: *当然必不可少的一点一定记得,在web.xml里必须... 阅读全文
posted @ 2018-09-02 00:38 小石头的一天 阅读(1111) 评论(0) 推荐(0)