My configuration is:
spring-4.2.3 mybatis-3.3.0 mybatis-spring-1.2.3 mapper looks like: *Mapper* looks like: package com.vsi.idp.map.server.mapper;//imports...public interface SeniorMapper extends BaseMapper<Long, Senior> { @Results({...}) @Select(...) public List<Senior> query(...); } *ServiceImpl* looks like: package com.vsi.idp.map.server;//imports... @Service("querySenior")public class SeniorQueryServiceImpl extends RemoteServiceServlet implements SeniorQueryService { @Autowired SeniorMapper mapper; @Override public List<Senior> query(Address address, String careType){...} } *applicationContext.xml* looks like: <beans ... default-lazy-init="true"> <!-- MyBatis Mapper Interfaces --> <mybatis:scan base-package="com.vsi.idp.map.server.mapper" /> //other configurations </beans> Spock *unit test* looks like below,and *runs as expected* @ContextConfiguration(locations = "file:war/WEB-INF/applicationContext.xml")public class SeniorQueryServiceImplTest extends Specification{ @Autowired SeniorQueryServiceImpl service def "query by full address"(){ //here query data succeed in real testing } } But when start web application,I got this warning: INFO: Root WebApplicationContext: initialization started Nov 23, 2015 7:12:29 PM org.springframework.web.context.support.XmlWebApplicationContext prepareRefreshINFO: Refreshing Root WebApplicationContext: startup date [Mon Nov 23 19:12:29 CST 2015]; root of context hierarchy Nov 23, 2015 7:12:29 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitionsINFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml] Nov 23, 2015 7:12:29 PM org.mybatis.spring.mapper.ClassPathMapperScanner doScanWARNING: No MyBatis mapper was found in '[com.vsi.idp.map.server.mapper]' package. Please check your configuration.Nov 23, 2015 7:12:30 PM org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor <init>INFO: JSR-330 'javax.inject.Inject' annotation found and supported for autowiringModule setup completed in 1698 msNov 23, 2015 7:12:30 PM org.springframework.web.context.ContextLoader initWebApplicationContextINFO: Root WebApplicationContext: initialization completed in 1557 ms I am sure that SeniorMapper is under package:*com.vsi.idp.map.server.mapper*,more strangely is that after changing <mybatis:scan base-package="com.vsi.idp.map.server.mapper" /> to nonexisted package <mybatis:scan base-package="com.vsi.idp.map.server.notexisted" /> I still got a similar warning: WARNING: No MyBatis mapper was found in '[com.vsi.idp.map.server.notexisted]' package. Please check your configuration.Nov 23, 2015 7:12:30 PM Not something like:package not existed,why? -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.