spring-framework / org.springframework.ui.freemarker / FreeMarkerConfigurationFactory / setDefaultEncoding

setDefaultEncoding

open fun setDefaultEncoding(defaultEncoding: String): Unit

Set the default encoding for the FreeMarker configuration. If not specified, FreeMarker will use the platform file encoding.

Used for template rendering unless there is an explicit encoding specified for the rendering process (for example, on Spring's FreeMarkerView).

See Also
freemarker.template.Configuration#setDefaultEncodingorg.springframework.web.servlet.view.freemarker.FreeMarkerView#setEncoding