
后端常见错误
java后端常见错误
孤独的冥王星
当你对成功的渴望犹如对呼吸的渴望时,那么你就会成功
展开
-
cn.hutool.core.io.IORuntimeException: ZipException: invalid CEN header (bad entry name)
压缩文件编码格式导致,默认编码格式UTF-8,压缩文件编码格式GBK。使用hutool工具类解压文件。解压时设置编码格式为GBK。原创 2024-06-07 16:30:57 · 809 阅读 · 1 评论 -
InputStream has already been read - do not use InputStreamResource if a stream needs to be read mult
InputStreamResource只能读取一次内容,当InputStreamResource 被读取一次后,第二次读取就会抛异常。springboot读取文件转成InputStreamResource,操作InputStreamResource。使用ByteArrayResource替换InputStreamResource。原创 2024-06-07 16:00:55 · 833 阅读 · 0 评论 -
Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that
mysql创建表时使用了系统已有表名,使用 com.mysql.jdbc.Driver (mysql-connector-java 5)驱动没什么问题,但是换成 com.mysql.cj.jdbc.Driver(mysql-connector-java 6)后就不行了。将表名用 " ` " 符号 位于 Esc 和 Tab 之间的按个键,切换到英文。原创 2023-07-12 16:01:16 · 3253 阅读 · 0 评论 -
Caused by: java.io.IOException: Tried to send an out-of-range integer as a 2-byte value: 103986
mybatis向postgresql插入批量数据,postgresql数据库的JDBC驱动对参数数量是有上限限制的,最大值为32767。插入数据时使用for循环拼接每条数据values(…),当拼接大小超过32767时就开始报错。这个大小由表中的字段多少和数据条数相关。拆分每次插入的数据条数,不要超过32767。原创 2023-04-16 21:35:08 · 1079 阅读 · 0 评论 -
Caused by: java.lang.ClassNotFoundException: springfox.documentation.spring.web.plugins.Docket
springboot项目更新代码后就报这个错误了,提示swagger找不到,但是整个项目都搜索不到这个类。发现之前引入过swagger,但是后来删掉了,git上没有了,但是本地的target中还存在。点击右侧的maven,找到root,选择Lifecycle->clean,清除target。原创 2023-04-04 16:56:03 · 1890 阅读 · 0 评论 -
Cannot resolve plugin org.apache.maven.plugins:maven-compiler-plugin:3.10.1
Cannot resolve plugin org.apache.maven.plugins:maven-compiler-plugin:3.10.1原创 2022-06-14 15:16:18 · 4117 阅读 · 3 评论 -
com.github.pagehelper.PageHelper incompatible with org.apache.ibatis.plugin.Interceptor
具体报错Caused by: java.lang.ClassCastException: com.github.pagehelper.PageHelper incompatible with org.apache.ibatis.plugin.Interceptor at org.apache.ibatis.builder.xml.XMLConfigBuilder.pluginElement(XMLConfigBuilder.java:189) ~[mybatis-3.5.9.jar:3.5.9] at原创 2022-03-28 15:21:54 · 481 阅读 · 0 评论