Comments (10)
超时就是我上一个issue中提到的问题
from blog-vue-springboot.
超时就是我上一个issue中提到的问题
改成你提的
//请求的参数
Object[] args = joinPoint.getArgs();
if(args.length>0) {
String params = JSON.toJSONString(args[0]);
log.setParams(params);
}
依然不行,不能注册,一刷新就疯狂的报连接超时
from blog-vue-springboot.
个人感觉应该是前端代码有问题,导致了前端不断地向后端发送请求。具体的错误在哪还得作者来告诉我们
from blog-vue-springboot.
//请求的参数
Object[] arguments = joinPoint.getArgs();
Object[] args = new Object[arguments.length];
for (int i = 0; i < arguments.length; i++) {
if (arguments[i] instanceof ServletRequest || arguments[i] instanceof ServletResponse || arguments[i] instanceof MultipartFile) {
//ServletRequest不能序列化,从入参里排除,否则报异常:java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)
//ServletResponse不能序列化 从入参里排除,否则报异常:java.lang.IllegalStateException: getOutputStream() has already been called for this response
continue;
}
args[i] = arguments[i];
}
if(args.length>0) {
String params = JSON.toJSONString(args[0]);
log.setParams(params);
}
把代码改成这样就行了,因为参数里面有HttpRequest的东西,这个是不能被序列化的,所以就会报错
from blog-vue-springboot.
超时就是我上一个issue中提到的问题
改成你提的
//请求的参数
Object[] args = joinPoint.getArgs();
if(args.length>0) {
String params = JSON.toJSONString(args[0]);
log.setParams(params);
}
依然不行,不能注册,一刷新就疯狂的报连接超时
//请求的参数
Object[] arguments = joinPoint.getArgs();
Object[] args = new Object[arguments.length];
for (int i = 0; i < arguments.length; i++) {
if (arguments[i] instanceof ServletRequest || arguments[i] instanceof ServletResponse || arguments[i] instanceof MultipartFile) {
//ServletRequest不能序列化,从入参里排除,否则报异常:java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)
//ServletResponse不能序列化 从入参里排除,否则报异常:java.lang.IllegalStateException: getOutputStream() has already been called for this response
continue;
}
args[i] = arguments[i];
}
if(args.length>0) {
String params = JSON.toJSONString(args[0]);
log.setParams(params);
}
把代码改成这样就行了,因为参数里面有HttpRequest的东西,这个是不能被序列化的,所以就会报错
from blog-vue-springboot.
超时就是我上一个issue中提到的问题
改成你提的
//请求的参数
Object[] args = joinPoint.getArgs();
if(args.length>0) {
String params = JSON.toJSONString(args[0]);
log.setParams(params);
}
依然不行,不能注册,一刷新就疯狂的报连接超时//请求的参数
Object[] arguments = joinPoint.getArgs();
Object[] args = new Object[arguments.length];
for (int i = 0; i < arguments.length; i++) {
if (arguments[i] instanceof ServletRequest || arguments[i] instanceof ServletResponse || arguments[i] instanceof MultipartFile) {
//ServletRequest不能序列化,从入参里排除,否则报异常:java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)
//ServletResponse不能序列化 从入参里排除,否则报异常:java.lang.IllegalStateException: getOutputStream() has already been called for this response
continue;
}
args[i] = arguments[i];
}
if(args.length>0) {
String params = JSON.toJSONString(args[0]);
log.setParams(params);
}
把代码改成这样就行了,因为参数里面有HttpRequest的东西,这个是不能被序列化的,所以就会报错
是 写日志时带上访问的参数,这里没有细看,可以注释掉或改一下逻辑
from blog-vue-springboot.
屏蔽掉了还是报连接超时
from blog-vue-springboot.
屏蔽掉了还是报连接超时
@gl01108023
可以跟下代码 找下具体问题
from blog-vue-springboot.
我也是这个错误 能解决一下吗
from blog-vue-springboot.
我也出现这个错误了,看了一下是因为默认导入的数据里文章的userid是1,而不存在1这个user。注册一个账号,把文章表里的user_id字段改成你刚注册的就行了
from blog-vue-springboot.
Related Issues (20)
- 你好,请问下这个博客项目的评论功能是只有用户个人能进行还是用户之间可以互相评论呢 HOT 1
- 请问登陆用户名和密码是多少呢 HOT 2
- 服务器是不是挂了 HOT 1
- blog-data.sql 记录与数据库字段不匹配 HOT 4
- 后端程序bug HOT 2
- 更改主题 HOT 1
- 咨询 HOT 1
- 咨询 HOT 2
- 咨询 HOT 2
- 请问适配手机吗? HOT 1
- 请问项目在没登录的时候展示文章展示的是哪个用户的文章呢?在哪里设置 HOT 1
- 各组件依赖webpack版本不一 HOT 1
- 现在的登录用户名和密码是多少呢?
- 模拟数据 HOT 1
- jdk HOT 1
- 刚启动-类型转换异常 HOT 1
- 打包后用live server运行dist/index.html显示空白
- 后台管理系统有无
- SQL导入 HOT 2
- 前端显示 连接超时 怎么办?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog-vue-springboot.