我已经通过编程配置了AnnotationConfigWebApplicationContext来运行web应用程序。但是我想添加一些由注解提供的自定义逻辑。
它的编程等效代码片段是什么:
<context:component-scan base-package="org.aaa">
<context:include-filter type="annotation" expression="com.annotation.Fooish" />
</context:component-scan>谢谢
发布于 2013-06-22 23:14:52
我已经将我的应用程序更改为使用注释而不是编程扫描。
@ComponentScan(
basePackages = {"xxx", "yyy"},
useDefaultFilters = true,
includeFilters = {@ComponentScan.Filter(value com.annotation.Fooish.class)}
)https://stackoverflow.com/questions/17237201
复制相似问题