context,exclude-filter 与 context,include-filter 1 在主容器中 (applicationContext.xml) ,将Controller的注解打消掉 1 2 3 4 5 6 7 <context:component-scan base-package="com"> <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" /> </context:component-scan> 2 而在springMVC配置文件中将Service注解给