open class FreeMarkerView : AbstractUrlBasedView
A View implementation that uses the FreeMarker template engine.
Depends on a single FreeMarkerConfig object such as FreeMarkerConfigurer being accessible in the application context. Alternatively set the FreeMarker configuration can be set directly on this class via #setConfiguration.
The url property is the location of the FreeMarker template relative to the FreeMarkerConfigurer's templateLoaderPath.
Note: Spring's FreeMarker support requires FreeMarker 2.3 or higher.
Author
Rossen Stoyanchev
Since
5.0
FreeMarkerView()
A Depends on a single FreeMarkerConfig object such as FreeMarkerConfigurer being accessible in the application context. Alternatively set the FreeMarker configuration can be set directly on this class via The Note: Spring's FreeMarker support requires FreeMarker 2.3 or higher. |
open fun afterPropertiesSet(): Unit |
|
open fun checkResourceExists(locale: Locale): Boolean
Check that the FreeMarker template used for this view exists and is valid. Can be overridden to customize the behavior, for example in case of multiple templates to be rendered into a single view. |
|
open fun setConfiguration(configuration: Configuration): Unit
Set the FreeMarker Configuration to be used by this view. Typically this property is not set directly. Instead a single FreeMarkerConfig is expected in the Spring application context which is used to obtain the FreeMarker configuration. |
|
open fun setEncoding(encoding: String): Unit
Set the encoding of the FreeMarker template file. By default FreeMarkerConfigurer sets the default encoding in the FreeMarker configuration to "UTF-8". It's recommended to specify the encoding in the FreeMarker Configuration rather than per template if all your templates share a common encoding. |
open fun getUrl(): String
Return the URL of the resource that this view wraps. |
|
open fun setUrl(url: String): Unit
Set the URL of the resource that this view wraps. The URL must be appropriate for the concrete View implementation. |
|
open fun toString(): String |