applicationContext.xml
<context:component-scan base-package=“com.project.*” >
<context:exclude-filter type=“annotation” expression=“org.springframework.stereotype.Controller”/>
</context:component-scan>
springmvc.xml
<context:component-scan base-package=“com.project.*” use-default-filters=“false” >
<context:include-filter type=“annotation” expression=“org.springframework.stereotype.Controller”/>
</context:component-scan>