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