2011-07-05 37 views
0

什麼是正確的語法來包含多個context:exclude-filter什麼是包含多個`context:exclude-filter`的正確語法?

我用,但我不知道它的工作原理:

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:context="http://www.springframework.org/schema/context" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
     http://www.springframework.org/schema/context 
     http://www.springframework.org/schema/context/spring-context-3.0.xsd"> 

    <context:annotation-config /> 
    <context:component-scan base-package="com.myapp"> 
     <context:exclude-filter type="aspectj" expression="com.myapp.components.*"/> 
     <context:exclude-filter type="aspectj" expression="com.myapp.batch.*"/> 
     <context:exclude-filter type="aspectj" expression="com.myapp.widgets.*"/> 
     <context:exclude-filter type="aspectj" expression="com.myapp.tools.*"/> 
    </context:component-scan> 

    <import resource="applicationContext-data.xml" /> 
    <import resource="applicationContext-security.xml" /> 
    <import resource="applicationContext-service.xml" /> 

</beans> 

回答