在学习Spring整合mybatis框架的过程中,发现过以下2处问题:
1:在运行tomcat时会出现的问题:
Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/LoginProject]]
解决方法:
将下列依赖去除,此类错误多数都是因为jar包类冲突导致
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-dao</artifactId>
<version>2.0.1</version>
</dependency>
2、在导向Servlet过程中出现:
HTTP 状态 500 - com.itcast.web.ServletDemo 类不是 Servlet
java.lang.ClassCastException:com.itcast.web.ServletDemo 无法转换为 javax.servlet.Servlet
解决方法:
将注解格式的路径前加上“/”就可以了