Web错误集锦
二饭
公众号:全栈开发日记
展开
-
项目升级SpringBoot3:java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest
并且项目中使用了Swagger,那么应该是Swagger版本问题,SpringBoot3中需要将springfox替换为springdoc。我这里使用的是knife4j来增强Swagger。由于在SpringBoot3版本中将。,如果我们项目中已经将所有的。原创 2023-09-24 21:19:17 · 3305 阅读 · 0 评论 -
【开发日记】Windows Docker 镜像启动异常Error response from daemon: Ports are not available: listen tcp 0.0.0.0:8
端口8848在排除范围内,由于时间问题,所以不去深究哪个应用对端口进行了排除。解决方法是修改8848端口为9848端口,不去使用8848,启动成功。是在启动Nacos镜像出现异常,8848端口绑定不上,所以报错。使用如下命令查看端口是否被排除。原创 2023-01-29 10:24:30 · 936 阅读 · 1 评论 -
【开发日记】聚合项目提示依赖项目没有找到Failure to find
聚合项目子项目找不到依赖原创 2023-01-07 11:34:08 · 1182 阅读 · 0 评论 -
【开发日记】Knife4j与Gateway搭配使用时请求前缀重复
【问题】Knife4j与Gateway搭配使用时请求前缀重复了一个basePath。【解决】在Gateway模块配置文件中添加如下配置。原创 2022-12-30 17:15:19 · 884 阅读 · 0 评论 -
【开发日记】RocketMQ broker启动失败无任何提示
【问题】Windows下 RocketMQ Name Server启动成功,broker无法启动且没有任何提示。此方法适用于启动无报错无提示的无法启动,如有提示请根据提示进行调整。下所有内容,再重启RocketMQ。原创 2022-12-26 17:08:16 · 1516 阅读 · 0 评论 -
【开发日记】Spring聚合项目启动时出现某某模块找不到类或注入不了Bean
执行主项目的mvn clean和mvn install,将所有资源重新打包。Spring聚合项目启动时出现某某模块找不到类或注入不了Bean。原创 2022-12-24 18:05:04 · 524 阅读 · 0 评论 -
【开发日记】Error: error:0308010C:digital envelope routines::unsupported
Error: error:0308010C:digital envelope routines::unsupported原创 2022-12-18 18:18:55 · 505 阅读 · 0 评论 -
nested exception is io.lettuce.core.RedisException: java.io.IOException:远程主机关闭了一个连接
可尝试如下两个方案:1、修改服务器ssh配置加入如下配置:ClientAliveInterval 600 ClientAliveCountMax 10保存,重启ssh服务。2、设置连接池spring: # Redis 配置 redis: host: *.***.***.** port: 6379 password: 123456 timeout: 50s # 连接池 lettuce: pool: m原创 2021-07-21 17:24:02 · 3043 阅读 · 0 评论 -
Unable to interpret the implicit parameter configuration with dataType: string....
使用Swagger @ApiImplicitParam注解的警告信息,解决方法:1、加入dataTypeClass属性,如下:@ApiImplicitParam(name = "date",value = "日期时间戳",dataType = "long",dataTypeClass = Long.class,required = true)2、降低Swagger 版本...原创 2021-07-17 15:38:57 · 2264 阅读 · 0 评论 -
The WebSocket session [5] has been closed and no method (apart from close())
使用WebSocket协议服务端主动向客户端发送消息时,该Session对象关闭了才会出现该异常。可使用session.isOpen()方法判断该连接是否打开,再进行推送消息。if(wsController.session.isOpen()){ wsController.session.getBasicRemote().sendText(message);}...原创 2021-07-06 14:53:17 · 1818 阅读 · 0 评论 -
No provider available from registry 192.168.124.195:2181 for service cn.sofw
这是dubbo老项目xml配置方式报错可以尝试如下配置:<dubbo:registry address="zookeeper://192.168.124.195:2181?init.timeout=60000" timeout="60000"/>原创 2021-01-13 17:02:00 · 1192 阅读 · 0 评论 -
vue项目部署到nginx上history模式出现404
我的解决方式如下,可以参考一下我的解决方案。1、创建路由对象// 路由对象export default new VueRouter({ mode:'history', routes: router});2、配置vue.config.js没有这个文件就创建一个,位置和babel.config.js同级module.exports = { publicPath: '/', //这个必须,引入静态资源需要从根路径引入,否则会找不到静态资源 dev原创 2021-07-06 17:21:25 · 341 阅读 · 0 评论 -
SpringBoot整合FastDFS文件上传出现java.net.SocketTimeoutException: Read timed out异常信息
不止是FastDFS文件上传,其他的分布式文件上传或普通文件上传,出现这个问题无非两个原因:1、连接不到服务器2、到达了连接服务器的超时时间先排除是不是连接不上tracker的可能。先传一个比较小的文件,如果小文件可以上传成功,只有大文件上传时才会出现java.net.SocketTimeoutException: Read timed out的异常。可以尝试如下方法:yml配置文件:# FastDFS配置fdfs: connect-timeout: 30000 # 连接超时时原创 2021-06-26 19:28:33 · 2312 阅读 · 0 评论 -
Spring拦截器获取注入的bean为null解决方式
出现问题的代码:public class MyInterceptor implements HandlerInterceptor { @Autowired ToolsService toolsService; @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {原创 2021-06-22 21:36:32 · 1366 阅读 · 2 评论 -
解决post请求中文乱码
如果设置过滤器和tomcat的参数还是无法解决,那么就需要我们手动来转了。如下String nickname=null;try { nickname = new String(nickname.getBytes("iso-8859-1"),"utf-8");} catch (UnsupportedEncodingException e) { e.printStackTrace();}最后输出nickname就可以看到转过来了。...原创 2021-03-28 16:00:00 · 221 阅读 · 0 评论 -
tomcat服务器GET请求中文乱码
get请求中文乱码,如果使用的是tomcat。则必须设置tomcat中的编码配置。这里我使用的是tomcat插件。<plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2<原创 2021-03-10 23:20:01 · 475 阅读 · 0 评论 -
Spring事务管理无法完成织入
Cannot create inner bean ‘(inner bean)#62d3d202’ of type [org.springframework.aop.aspectj.AspectJExpressionPointcut] while setting bean property ‘pointcut’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean wi原创 2020-12-20 19:39:21 · 241 阅读 · 0 评论 -
Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run
<dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dep...原创 2020-12-20 18:07:10 · 783 阅读 · 0 评论 -
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.TooManyR
报错信息:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 35原因是:你想要返回一条结果,但是却查到了35条结果,所以报错。将检查xml文件哪条sql语句书写有问题,或返回结果映原创 2020-12-20 16:05:30 · 708 阅读 · 0 评论 -
Maven项目添加了junit依赖不能使用测试模块错误
版本较低,将junit版本提高。4.*版本基本没什么问题原创 2020-12-20 15:34:43 · 608 阅读 · 1 评论 -
Maven项目pom.xml文件plugin插件报红解决方法
<build> <finalName>maven2</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifact.原创 2020-12-20 12:44:04 · 18927 阅读 · 5 评论 -
no tests found matching错误
解决:Junit依赖包版本太低,或是没有加@Test注解(注意导包)原创 2020-12-17 18:15:50 · 226 阅读 · 0 评论 -
Invalid bound statement (not found): com.mapper.UserMapper.getUser
maven项目构建SSM项目时,找不到mapper.xml文件正确的应该是在resources目录中创建一个与mapper.java接口文件相同的包,将xml文件放进去就可以了。原创 2020-12-16 19:09:55 · 3548 阅读 · 0 评论 -
Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project
<dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope>这里生命周期必须为provided</de原创 2020-12-16 18:26:43 · 191 阅读 · 0 评论