我有几个服务:
用@Service注释注释.如何排除除一个以外的所有服务?
例如,我想只使用MailService.我使用以下配置:
<context:component-scan base-package="example">
<context:include-filter type="aspectj" expression="example..MailService*" />
<context:exclude-filter type="aspectj" expression="example..*Service*" />
</context:component-scan>
Run Code Online (Sandbox Code Playgroud)
但现在所有服务都被排除在外.
如果存在一个包含MailService的规则,为什么要排除所有服务?