搭建spring+mybatis+Servlet环境中的坑
在学习Spring整合mybatis框架的过程中,发现过以下2处问题:1:在运行tomcat时会出现的问题:Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/LoginProject]]解决方法:将下列依赖去除,此类错误多数都是因为jar包类冲突导致2、在导向Serv
·
在学习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
解决方法:
将注解格式的路径前加上“/”就可以了

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)