类 RenderingContext
- java.lang.Object
- org.springframework.web.servlet.view.script.RenderingContext
public class RenderingContext extends Object
Context passed toScriptTemplateView
render function in order to make the application context, the locale, the template loader and the url available on scripting side.- 从以下版本开始:
- 5.0
- 作者:
- Sebastien Deleuze
构造器概要
构造器 构造器 说明 RenderingContext(ApplicationContext applicationContext, Locale locale, Function<String,String> templateLoader, String url)
Create a newRenderingContext
.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ApplicationContext
getApplicationContext()
Return the application context.Locale
getLocale()
Return the locale of the rendered template.Function<String,String>
getTemplateLoader()
Return a function that takes a template path as input and returns the template content as a String.String
getUrl()
Return the URL of the rendered template.
构造器详细资料
RenderingContext
public RenderingContext(ApplicationContext applicationContext, Locale locale, Function<String,String> templateLoader, String url)
Create a newRenderingContext
.- 参数:
applicationContext
- the application contextlocale
- the locale of the rendered templatetemplateLoader
- a function that takes a template path as input and returns the template content as a Stringurl
- the URL of the rendered template
方法详细资料
getApplicationContext
public ApplicationContext getApplicationContext()
Return the application context.
getTemplateLoader
public Function<String,String> getTemplateLoader()
Return a function that takes a template path as input and returns the template content as a String.