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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章