SpringMvc+Spring同时扫描出现问题。会有奇怪的问题。
在spring中排除controller
<context:component-scan base-package="com.southgis.ibase.file.service,com.southgis.ibase.file.dao" >
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
让springmvc只扫描controller
<context:component-scan base-package="com.southgis.ibase.file.webservice" use-default-filters="false">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
<context:include-filter type="annotation" expression="org.springframework.web.bind.annotation.ControllerAdvice"/>
</context:component-scan>