maven项目卡在Initializing Spring root WebApplicationContext
最近在网上自学taotao商城项目,按着教程部署ssm框架的时候,遇到了这个卡在Initializing Spring root WebApplicationContext的问题。项目刚开始可以正常部署,但是在查找数据库数据的时候会报下面错误:
严重: Servlet.service() for servlet [taotao-manager] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample] with root cause
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample
在网上查了以后发现是由于逆向工程里拷过来的Mapper里的xml文件被漏掉了,然后在Pom里面加了:
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
程序运行之后文件夹里有了相应的xml,可以部署一直卡在Initializing Spring root WebApplicationContext。
有没有大神指导一下哪里出了问题,谢谢了