Exception记录

1. java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
前端报错如图:
在这里插入图片描述

原因很简单,请求本应是http://localhost:8080/pic/upload
我写成了https://localhost:8080/pic/upload

2. org.springframework.web.servlet.NoHandlerFoundException: No handler found for OPTIONS /ip-matrix/sys/ingestnetcard/all

找不到路径

3. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘deviceId’ in 'class java.lang.String’

在dao层添加@Param

4. org.springframework.http.converter.HttpMessageNotReadableException:Required request body is missing

在这里插入图片描述

解决:

主要是请求参数所在位置不同,之前习惯性的写param,这是get请求的写法,参数拼接在url后了,请求体中确实没有数据,改为data就好啦
在这里插入图片描述

5. npm install 时报错 Error: ENOENT: no such file or directory, rename ‘C:\Users\ADMINI~1…

删除node_modules文件夹重新npm install

6. cn.afterturn.easypoi.exception.excel.ExcelExportException: Excel导出错误
Caused by: java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.CellStyle.setAlignment(S)V

jar包版本问题

解决:
在这里插入图片描述
7. Exception in thread “main” org.springframework.web.client.ResourceAccessException: I/O error on PATCH request for “http://192.168…/api/v1/servicesmngt/services/2a3546c0-e807-4fb6-bb09-6d1d636e6ec9”: Invalid HTTP method: PATCH; nested exception is java.net.ProtocolException: Invalid HTTP method: PATCH

使用restTempte发送PATCH请求失败

解决:

在这里插入图片描述
8. Exception in thread “main” java.lang.NoSuchMethodError: me.zhengjie.shop.domain.ShopStore.getId()Ljava/lang/Integer;

解决:

方法重复,我这里是由于把类的id类型由 int 改为 Long,重启时没有清理缓存

在这里插入图片描述

9. HttpMediaTypeNotSupportedException: Content type ‘*/*;charset=UTF-8’ not supported

解决:
在这里插入图片描述

11. ClassNotFoundException: org.apache.http.impl.client.HttpClients

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值