Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
读取spring配置xml中的上下文参数值_Spring_Tomcat - Fatal编程技术网

读取spring配置xml中的上下文参数值

读取spring配置xml中的上下文参数值,spring,tomcat,Spring,Tomcat,在context.xml中添加了以下参数 <Parameter name="channel" value="any" override="false"/> 我想读取spring配置xml中通道的值 <intercept-url pattern="/**" access="ROLE_USER" requires-channel="READ_VALUE_OF_CHANNEL_PARAMETER" /> 需要替换信道参数的读取值。 怎么做?找到了答

在context.xml中添加了以下参数

<Parameter name="channel" value="any"
         override="false"/>

我想读取spring配置xml中通道的值

<intercept-url pattern="/**" access="ROLE_USER" requires-channel="READ_VALUE_OF_CHANNEL_PARAMETER" />

需要替换信道参数的读取值。 怎么做?

找到了答案

<intercept-url pattern="/**" access="ROLE_USER" requires-channel="#{contextParameters.channel}" />

找到了答案

<intercept-url pattern="/**" access="ROLE_USER" requires-channel="#{contextParameters.channel}" />