类 TemplateAvailabilityProviders
java.lang.Object
org.springframework.boot.autoconfigure.template.TemplateAvailabilityProviders
Collection of
TemplateAvailabilityProvider
beans that can be used to check
which (if any) templating engine supports a given view. Caches responses unless the
spring.template.provider.cache
property is set to false
.- 从以下版本开始:
- 1.4.0
- 作者:
- Phillip Webb, Madhura Bhave
-
构造器概要
构造器限定符构造器说明TemplateAvailabilityProviders
(ClassLoader classLoader) Create a newTemplateAvailabilityProviders
instance.protected
TemplateAvailabilityProviders
(Collection<? extends TemplateAvailabilityProvider> providers) Create a newTemplateAvailabilityProviders
instance.TemplateAvailabilityProviders
(ApplicationContext applicationContext) Create a newTemplateAvailabilityProviders
instance. -
方法概要
修饰符和类型方法说明getProvider
(String view, ApplicationContext applicationContext) Get the provider that can be used to render the given view.getProvider
(String view, Environment environment, ClassLoader classLoader, ResourceLoader resourceLoader) Get the provider that can be used to render the given view.Return the underlying providers being used.
-
构造器详细资料
-
TemplateAvailabilityProviders
Create a newTemplateAvailabilityProviders
instance.- 参数:
applicationContext
- the source application context
-
TemplateAvailabilityProviders
Create a newTemplateAvailabilityProviders
instance.- 参数:
classLoader
- the source class loader
-
TemplateAvailabilityProviders
protected TemplateAvailabilityProviders(Collection<? extends TemplateAvailabilityProvider> providers) Create a newTemplateAvailabilityProviders
instance.- 参数:
providers
- the underlying providers
-
-
方法详细资料
-
getProviders
Return the underlying providers being used.- 返回:
- the providers being used
-
getProvider
Get the provider that can be used to render the given view.- 参数:
view
- the view to renderapplicationContext
- the application context- 返回:
- a
TemplateAvailabilityProvider
or null
-
getProvider
public TemplateAvailabilityProvider getProvider(String view, Environment environment, ClassLoader classLoader, ResourceLoader resourceLoader) Get the provider that can be used to render the given view.- 参数:
view
- the view to renderenvironment
- the environmentclassLoader
- the class loaderresourceLoader
- the resource loader- 返回:
- a
TemplateAvailabilityProvider
or null
-