English 中文(简体)
List of Spring EL Variables?
原标题:List of Spring EL Variables?

春季EL支持一些预先确定的变量

  • {#systemProperties. ... }
  • {#systemEnvironment. ... }
  • {#request. ...}
  • {#session. ...}

The first two once are documented in the Spring Reference: chapter 6. Spring Expression Language (SpEL). The two others are not mentioned in the Spring Reference (or I did not found them.) (I found them in this slides, as well as its usage in spring social and this question).

www.un.org/Depts/DGACM/index_spanish.htm 因此,我的问题是:是否有一个或多或少完整的预设的春季-轮变量清单?

我猜测,这些预先界定的变量中有些并非由春季核心本身来界定,而是通过“启动”一些模块,如春季-mvc。 因此,我对“上查阅。

最佳回答

I can not answer your root question but I may give you a hint.

有一些事先界定的旁观者在申请开始时就登记,但这取决于你所使用的背景类型。

通常见systemPropertiessystemEnvironment。 在网络应用中浏览春天,您还将获得<条码>servletContext、contextParatiescontextAttributes。 我假设,<代码>request和session也与网络应用环境有关。

我在利用3.0.6RELEASE的申请书拼凑时发现了这一点。 良好的起点是普林西ELResolver.getValue()方法。

问题回答

我还注意到,<条码>环境解决了目前的<条码> org. mersframework.env.Environment。 我确信这并不是一个有文件记载的特征,但我正在寻求一种简明的方法,在我的<代码>上做到以下几点。 配置类别:

@Value("#{environment.acceptsProfiles( test )}")
private boolean test;

这样,我就可以以进一步推论来放弃这一价值。

我提交了以下联合执行报告,以处理这一问题:

https://jira.springsource.org/browse/SPR-9037





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签