diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerView.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerView.java index f2b5cb3ef82..923a5b54055 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerView.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerView.java @@ -56,7 +56,7 @@ import org.springframework.web.server.ServerWebExchange; * *

Depends on a single {@link FreeMarkerConfig} object such as * {@link FreeMarkerConfigurer} being accessible in the application context. - * Alternatively the FreeMarker configuration can be set directly on this + * Alternatively the FreeMarker {@link Configuration} can be set directly on this * class via {@link #setConfiguration}. * *

The {@link #setUrl(String) url} property is the location of the FreeMarker @@ -92,7 +92,7 @@ public class FreeMarkerView extends AbstractUrlBasedView { /** - * Set the FreeMarker Configuration to be used by this view. + * Set the FreeMarker {@link Configuration} to be used by this view. *

Typically this property is not set directly. Instead a single * {@link FreeMarkerConfig} is expected in the Spring application context * which is used to obtain the FreeMarker configuration. @@ -102,7 +102,7 @@ public class FreeMarkerView extends AbstractUrlBasedView { } /** - * Return the FreeMarker configuration used by this view. + * Get the FreeMarker {@link Configuration} used by this view. */ @Nullable protected Configuration getConfiguration() { @@ -110,10 +110,10 @@ public class FreeMarkerView extends AbstractUrlBasedView { } /** - * Obtain the FreeMarker configuration for actual use. + * Obtain the FreeMarker {@link Configuration} for actual use. * @return the FreeMarker configuration (never {@code null}) - * @throws IllegalStateException in case of no Configuration object set - * @since 5.0 + * @throws IllegalStateException in case of no {@code Configuration} object set + * @see #getConfiguration() */ protected Configuration obtainConfiguration() { Configuration configuration = getConfiguration(); @@ -125,15 +125,15 @@ public class FreeMarkerView extends AbstractUrlBasedView { * Set the encoding of the FreeMarker template file. *

By default {@link 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. + * encoding in the FreeMarker {@link Configuration} rather than per template + * if all your templates share a common encoding. */ public void setEncoding(@Nullable String encoding) { this.encoding = encoding; } /** - * Return the encoding for the FreeMarker template. + * Get the encoding for the FreeMarker template. */ @Nullable protected String getEncoding() { @@ -147,6 +147,7 @@ public class FreeMarkerView extends AbstractUrlBasedView { *

Needed for Spring's FreeMarker default macros. Note that this is * not required for templates that use HTML forms unless you * wish to take advantage of the Spring helper macros. + * @since 5.2 * @see #SPRING_MACRO_REQUEST_CONTEXT_ATTRIBUTE */ public void setExposeSpringMacroHelpers(boolean exposeSpringMacroHelpers) { @@ -164,9 +165,9 @@ public class FreeMarkerView extends AbstractUrlBasedView { } /** - * Autodetect a {@link FreeMarkerConfig} object via the ApplicationContext. - * @return the Configuration instance to use for FreeMarkerViews - * @throws BeansException if no Configuration instance could be found + * Autodetect a {@link FreeMarkerConfig} object in the {@code ApplicationContext}. + * @return the {@code FreeMarkerConfig} instance to use for this view + * @throws BeansException if no {@code FreeMarkerConfig} instance could be found * @see #setConfiguration */ protected FreeMarkerConfig autodetectConfiguration() throws BeansException { @@ -176,7 +177,7 @@ public class FreeMarkerView extends AbstractUrlBasedView { } catch (NoSuchBeanDefinitionException ex) { throw new ApplicationContextException( - "Must define a single FreeMarkerConfig bean in this web application context " + + "Must define a single FreeMarkerConfig bean in this application context " + "(may be inherited): FreeMarkerConfigurer is the usual implementation. " + "This bean may be given any name.", ex); } @@ -276,7 +277,7 @@ public class FreeMarkerView extends AbstractUrlBasedView { } /** - * Build a FreeMarker template model for the given model Map. + * Build a FreeMarker template model for the given model map. *

The default implementation builds a {@link SimpleHash}. * @param model the model to use for rendering * @param exchange current exchange @@ -289,8 +290,8 @@ public class FreeMarkerView extends AbstractUrlBasedView { } /** - * Return the configured FreeMarker {@link ObjectWrapper}, or the - * {@link ObjectWrapper#DEFAULT_WRAPPER default wrapper} if none specified. + * Get the configured FreeMarker {@link ObjectWrapper}, or the + * {@linkplain ObjectWrapper#DEFAULT_WRAPPER default wrapper} if none specified. * @see freemarker.template.Configuration#getObjectWrapper() */ protected ObjectWrapper getObjectWrapper() { @@ -300,10 +301,8 @@ public class FreeMarkerView extends AbstractUrlBasedView { } /** - * Retrieve the FreeMarker template for the given locale, - * to be rendering by this view. - *

By default, the template specified by the "url" bean property - * will be retrieved. + * Get the FreeMarker template for the given locale, to be rendered by this view. + *

By default, the template specified by the "url" bean property will be retrieved. * @param locale the current locale * @return the FreeMarker template to render */