no thread-bound request found:are you referring to request

2024-06-24 07:08

本文主要是介绍no thread-bound request found:are you referring to request,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

问题描述:

通过webservice接口调用程序时,发现在执行查询的时候一直报一个错误,错误信息如下:

java.lang.IllegalStateExceptino:No thread-bound request found:are you referring to request attributes outside of an actual web request,or processing a request outside of the originally receiving  thread? If you are actually operating within a web request and still receive this message,your code is probably running outside of DispatcherServlet/DispatcherPortlet:In this case, use RequestContextListener or RequestContextFilter to expose the current request......

解决方法:

在web.xml文件中配置这句话就ok了

 <listener><listener-class>org.springframework.web.context.request.RequestContextListener</listener-class></listener>

 

这篇关于no thread-bound request found:are you referring to request的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1089488

相关文章

yum install 失败报错`XZ_5.1.2alpha' not found (required by /lib64/librpmio.so.3)

/export/env/py3.6/lib/liblzma.so.5: version `XZ_5.1.2alpha' not found (required by /lib64/librpmio.so.3)   到/export/env/py3.6/lib cp /lib64/liblzma.so.5.2.2 . sudo ln -s -f liblzma.so.5.2.2 liblzm

BD错误集锦1——[Hive]ERROR StatusLogger No log4j2 configuration file found. Using default configuration:

错误描述:在使用IDEA进行jdbc方式连接到hive数据仓库时,出现以下错误:                ERROR StatusLogger No log4j2 configuration file found. 问题原因:缺少log4j2.xml文件   <?xml version="1.0" encoding="UTF-8"?><Configuration><Appender

# bash: chkconfig: command not found 解决方法

bash: chkconfig: command not found 解决方法 一、chkconfig 错误描述: 这个错误表明在 Bash 环境下,尝试执行 chkconfig 命令,但是系统找不到这个命令。chkconfig 命令是一个用于管理 Linux 系统中服务的启动和停止的工具,通常它是 initscripts 包的一部分,但在最新的 Linux 发行版中可能已经被 syste

crontab: command not found

[root@localhost syweb-sdkapi-new_manager]# crontab -e -bash: crontab: command not found 解决方法: yum install vixie-cron yum install crontabs service crond start           /etc/init.d/crond

jmeter之Thread Group(线程组)

Thread Group(线程组) 1.线程组,或者可以叫用户组,进行性能测试时的用户资源池。 2.是任何一个测试计划执行的开始点。 3.上一篇提到的“控制器”和“HTTP请求”(采集器)必须在线程组内;监听器等其他组件,可以直接放在测试计划下。 线程组设置参数的意义 我们以下图为例,进行详细说明。见下图:  区域1(在取样器错误后要执行的动作) 这个区域的主要作用很明显,在线程内

Exception processing async thread queue Exception processing async thread queue

错误信息描述: eclipse 在debug中弹出异常信息框 Exception processing async thread queue Exception processing async thread queue 解决方法: eclipse 中有一个Expressions窗口,里面添加的 expression 没有正确执行,并且没有删除,只要 Remove All Expressio

vue dist文件打开index.html报Failed to load resource: net::ERR_FILE_NOT_FOUND

本地正常。打包好的dist文件打开index.html报Failed to load resource: net::ERR_FILE_NOT_FOUND 解决办法: 在webpack.prod.conf.js 中output添加参数publicPath:’./’ 在webpack.base.conf.js里 publicPath: process.env.NODE_ENV === ‘pro

query string parameters 和request payload

HTTP请求中,如果是get请求,那么表单参数以name=value&name1=value1的形式附到url的后; post请求:表单参数是在请求体中,也是name=value&name1=value1的形式在请求。 export const voucherDetailAdd=(token,formStr) =>{return axios.post(`${base}/voucher/deta

scrapy 爬网站 显示 Filtered offsite request to 错误.

爬取zol 网站图片,无法抓取. 在 setting.py 文件中 设置 日志 记录等级  LOG_LEVEL= 'DEBUG' LOG_FILE ='log.txt' 查看日志 发现报 2015-11-07 14:43:43+0800 [meizitu] DEBUG: Filtered offsite request to 'bbs.zol.com.cn': <GET h

FFplay源码分析-video_thread

《FFmpeg原理》的社群来了,想加入社群的朋友请购买 VIP 版,VIP 版有更高级的内容与答疑服务。 本系列 以 ffmpeg4.2 源码为准,下载地址:链接:百度网盘 提取码:g3k8 FFplay 源码分析系列以一条简单的命令开始,ffplay -i a.mp4。a.mp4下载链接:百度网盘,提取码:nl0s 。 上一篇文章已经讲解完了 audio_thread() 音频解码