invalid bound statement (not found) - 接手一个老项目时报的几个错误处理方案

简介: invalid bound statement (not found) - 接手一个老项目时报的几个错误处理方案

invalid bound statement (not found) - 接手一个老项目时报的几个错误处理方案


1、invalid bound statement (not found)


在pom.xml的中配置了resource


<!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 -->
    <resources>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/*.properties</include>
          <include>**/*.xml</include>
        </includes>
        <filtering>false</filtering>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*.properties</include>
          <include>**/*.xml</include>
        </includes>
        <filtering>false</filtering>
      </resource>
    </resources>


2、org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletCon


<!-- 导入java ee jar 包(重点在下方依赖红色处,不加上运行范围,编译时会冲突) -->
<dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <scope>provided</scope>
    <version>7.0</version>
</dependency>

3、maven集成tomcat7


<plugin>
             <groupId>org.apache.tomcat.maven</groupId>
             <!-- tomcat7的插件, 不同tomcat版本这个也不一样 -->
             <artifactId>tomcat7-maven-plugin</artifactId>
             <version>2.1</version>
             <configuration>
                 <!-- 通过maven tomcat7:run运行项目时,访问项目的端口号 -->
                 <port>9090</port>
                 <!-- 项目访问路径  本例:localhost:9090,  如果配置的aa, 则访问路径为localhost:9090/aa-->
                 <path>/</path>
                 <uriEncoding>UTF-8</uriEncoding>
             </configuration>
 </plugin>


目录
相关文章
|
7月前
|
Java 应用服务中间件 微服务
【Java异常】feign.FeignException: status 400 reading xxx 异常解决方案
【Java异常】feign.FeignException: status 400 reading xxx 异常解决方案
62 0
|
3天前
|
弹性计算 缓存 Serverless
Serverless 应用引擎操作报错合集之阿里函数计算中我打开sd时遇到错误,信息为"Function instance exited unexpectedly(code 1, message:operation not permitted) with start command ' '."如何解决
Serverless 应用引擎(SAE)是阿里云提供的Serverless PaaS平台,支持Spring Cloud、Dubbo、HSF等主流微服务框架,简化应用的部署、运维和弹性伸缩。在使用SAE过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
26 6
|
数据库
面向失败的设计-Planning for failure
这篇文章,将会介绍如何把结构化状况以及应对方式,从而得以以系统地方式沉淀积累,成为可复用的预案;最后,文章会结合阿里巴巴10年大促的实践,给出实践预案的原则性建议。
1515 0
|
3天前
|
Java 数据库连接 mybatis
项目移植到原先mybasis项目里出现BindingException: Invalid bound statement (not found): **selectPage
项目移植到原先mybasis项目里出现BindingException: Invalid bound statement (not found): **selectPage
|
3天前
|
SQL JSON Java
【bug日记】已解决:Invalid bound statement (not found): 找不到对应的Mapper映射类
【bug日记】已解决:Invalid bound statement (not found): 找不到对应的Mapper映射类
|
3天前
|
JavaScript 前端开发 算法
【Node.js 版本过高】运行前端时,遇到错误 `Error: error:0308010C:digital envelope routines::unsupported`
【Node.js 版本过高】运行前端时,遇到错误 `Error: error:0308010C:digital envelope routines::unsupported`
96 0
|
7月前
|
编译器
解决Invalid bound statement (not found)错误~
解决Invalid bound statement (not found)错误~
|
XML SQL 数据格式
Invalid bound statement (not found)错误的可能原因
Invalid bound statement (not found)错误的可能原因
425 0
|
XML SQL Java
如何去寻找解决bug?(以Mapped Statements collection does not contain value for xxx的异常为例)
如何去寻找解决bug?(以Mapped Statements collection does not contain value for xxx的异常为例)
如何去寻找解决bug?(以Mapped Statements collection does not contain value for xxx的异常为例)
express学习31-多人管理23错误unexpected identifier
express学习31-多人管理23错误unexpected identifier
74 0
express学习31-多人管理23错误unexpected identifier