![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring
ccl_space
这个作者很懒,什么都没留下…
展开
-
spring扫描类在指定包路径通过注解过滤
spring 框架中通过 可以指定扫描包框架中的类,关键代码是 ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(false); provider.addIncludeFilter(new AnnotationTypeF原创 2015-01-29 14:21:53 · 7899 阅读 · 0 评论 -
spring异步调用任务或者事件
spring事件可以通过实现接口ApplicationListener来定义事件侦听器,在onApplicationEvent中写处理事件的逻辑;但这回调是同步的,若想异步去调用,可以通过加@Async注解,并打开任务调用线程来实现。spring 配置文件中加上:转载 2015-01-29 14:32:40 · 1105 阅读 · 0 评论 -
spring的placeholder配置
1、spring 的 web 工程的 web.xml 文件配置 dispatchServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation classpath:/conf/dispatch-servlet.xml 1 dispatchServlet *.do原创 2015-10-22 19:45:16 · 1499 阅读 · 0 评论