类 AbstractUrlBasedView
- java.lang.Object
- org.springframework.web.reactive.result.view.AbstractView
- org.springframework.web.reactive.result.view.AbstractUrlBasedView
- 所有已实现的接口:
Aware
,BeanNameAware
,InitializingBean
,ApplicationContextAware
,View
- 直接已知子类:
FreeMarkerView
,RedirectView
,ScriptTemplateView
public abstract class AbstractUrlBasedView extends AbstractView implements InitializingBean
Abstract base class for URL-based views. Provides a consistent way of holding the URL that a View wraps, in the form of a "url" bean property.- 从以下版本开始:
- 5.0
- 作者:
- Rossen Stoyanchev
字段概要
从类继承的字段 org.springframework.web.reactive.result.view.AbstractView
logger, REQUEST_DATA_VALUE_PROCESSOR_BEAN_NAME
从接口继承的字段 org.springframework.web.reactive.result.view.View
BINDING_CONTEXT_ATTRIBUTE
构造器概要
构造器 限定符 构造器 说明 protected
AbstractUrlBasedView()
Constructor for use as a bean.protected
AbstractUrlBasedView(String url)
Create a new AbstractUrlBasedView with the given URL.
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.abstract boolean
checkResourceExists(Locale locale)
Check whether the resource for the configured URL actually exists.String
getUrl()
Return the URL of the resource that this view wraps.void
setUrl(String url)
Set the URL of the resource that this view wraps.String
toString()
从类继承的方法 org.springframework.web.reactive.result.view.AbstractView
createRequestContext, formatViewName, getApplicationContext, getBeanName, getDefaultCharset, getModelAttributes, getRequestContextAttribute, getRequestDataValueProcessor, getSupportedMediaTypes, obtainApplicationContext, render, renderInternal, resolveAsyncAttributes, resolveAsyncAttributes, setApplicationContext, setBeanName, setDefaultCharset, setRequestContextAttribute, setSupportedMediaTypes
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 org.springframework.web.reactive.result.view.View
isRedirectView
构造器详细资料
AbstractUrlBasedView
protected AbstractUrlBasedView()
Constructor for use as a bean.
AbstractUrlBasedView
protected AbstractUrlBasedView(String url)
Create a new AbstractUrlBasedView with the given URL.
方法详细资料
setUrl
public void setUrl(@Nullable String url)
Set the URL of the resource that this view wraps. The URL must be appropriate for the concrete View implementation.
afterPropertiesSet
public void afterPropertiesSet() throws Exception
从接口复制的说明:InitializingBean
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
- 指定者:
afterPropertiesSet
在接口中InitializingBean
- 抛出:
Exception
- in the event of misconfiguration (such as failure to set an essential property) or if initialization fails for any other reason
checkResourceExists
public abstract boolean checkResourceExists(Locale locale) throws Exception
Check whether the resource for the configured URL actually exists.- 参数:
locale
- the desired Locale that we're looking for- 返回:
false
if the resource existsfalse
if we know that it does not exist- 抛出:
Exception
- if the resource exists but is invalid (e.g. could not be parsed)
toString
public String toString()
- 覆盖:
toString
在类中AbstractView