Fix javadoc checkstyle issues
Fix checkstyle violations for javadoc. Issue: SPR-16968
This commit is contained in:
committed by
Juergen Hoeller
parent
032096d699
commit
e0480f75ac
@@ -291,60 +291,60 @@ public class DispatcherServlet extends FrameworkServlet {
|
||||
}
|
||||
}
|
||||
|
||||
/** Detect all HandlerMappings or just expect "handlerMapping" bean? */
|
||||
/** Detect all HandlerMappings or just expect "handlerMapping" bean?. */
|
||||
private boolean detectAllHandlerMappings = true;
|
||||
|
||||
/** Detect all HandlerAdapters or just expect "handlerAdapter" bean? */
|
||||
/** Detect all HandlerAdapters or just expect "handlerAdapter" bean?. */
|
||||
private boolean detectAllHandlerAdapters = true;
|
||||
|
||||
/** Detect all HandlerExceptionResolvers or just expect "handlerExceptionResolver" bean? */
|
||||
/** Detect all HandlerExceptionResolvers or just expect "handlerExceptionResolver" bean?. */
|
||||
private boolean detectAllHandlerExceptionResolvers = true;
|
||||
|
||||
/** Detect all ViewResolvers or just expect "viewResolver" bean? */
|
||||
/** Detect all ViewResolvers or just expect "viewResolver" bean?. */
|
||||
private boolean detectAllViewResolvers = true;
|
||||
|
||||
/** Throw a NoHandlerFoundException if no Handler was found to process this request? **/
|
||||
/** Throw a NoHandlerFoundException if no Handler was found to process this request? *.*/
|
||||
private boolean throwExceptionIfNoHandlerFound = false;
|
||||
|
||||
/** Perform cleanup of request attributes after include request? */
|
||||
/** Perform cleanup of request attributes after include request?. */
|
||||
private boolean cleanupAfterInclude = true;
|
||||
|
||||
/** Do not log potentially sensitive information (params at DEBUG and headers at TRACE). */
|
||||
private boolean disableLoggingRequestDetails = false;
|
||||
|
||||
/** MultipartResolver used by this servlet */
|
||||
/** MultipartResolver used by this servlet. */
|
||||
@Nullable
|
||||
private MultipartResolver multipartResolver;
|
||||
|
||||
/** LocaleResolver used by this servlet */
|
||||
/** LocaleResolver used by this servlet. */
|
||||
@Nullable
|
||||
private LocaleResolver localeResolver;
|
||||
|
||||
/** ThemeResolver used by this servlet */
|
||||
/** ThemeResolver used by this servlet. */
|
||||
@Nullable
|
||||
private ThemeResolver themeResolver;
|
||||
|
||||
/** List of HandlerMappings used by this servlet */
|
||||
/** List of HandlerMappings used by this servlet. */
|
||||
@Nullable
|
||||
private List<HandlerMapping> handlerMappings;
|
||||
|
||||
/** List of HandlerAdapters used by this servlet */
|
||||
/** List of HandlerAdapters used by this servlet. */
|
||||
@Nullable
|
||||
private List<HandlerAdapter> handlerAdapters;
|
||||
|
||||
/** List of HandlerExceptionResolvers used by this servlet */
|
||||
/** List of HandlerExceptionResolvers used by this servlet. */
|
||||
@Nullable
|
||||
private List<HandlerExceptionResolver> handlerExceptionResolvers;
|
||||
|
||||
/** RequestToViewNameTranslator used by this servlet */
|
||||
/** RequestToViewNameTranslator used by this servlet. */
|
||||
@Nullable
|
||||
private RequestToViewNameTranslator viewNameTranslator;
|
||||
|
||||
/** FlashMapManager used by this servlet */
|
||||
/** FlashMapManager used by this servlet. */
|
||||
@Nullable
|
||||
private FlashMapManager flashMapManager;
|
||||
|
||||
/** List of ViewResolvers used by this servlet */
|
||||
/** List of ViewResolvers used by this servlet. */
|
||||
@Nullable
|
||||
private List<ViewResolver> viewResolvers;
|
||||
|
||||
|
||||
@@ -165,56 +165,56 @@ public abstract class FrameworkServlet extends HttpServletBean implements Applic
|
||||
private static final String INIT_PARAM_DELIMITERS = ",; \t\n";
|
||||
|
||||
|
||||
/** ServletContext attribute to find the WebApplicationContext in */
|
||||
/** ServletContext attribute to find the WebApplicationContext in. */
|
||||
@Nullable
|
||||
private String contextAttribute;
|
||||
|
||||
/** WebApplicationContext implementation class to create */
|
||||
/** WebApplicationContext implementation class to create. */
|
||||
private Class<?> contextClass = DEFAULT_CONTEXT_CLASS;
|
||||
|
||||
/** WebApplicationContext id to assign */
|
||||
/** WebApplicationContext id to assign. */
|
||||
@Nullable
|
||||
private String contextId;
|
||||
|
||||
/** Namespace for this servlet */
|
||||
/** Namespace for this servlet. */
|
||||
@Nullable
|
||||
private String namespace;
|
||||
|
||||
/** Explicit context config location */
|
||||
/** Explicit context config location. */
|
||||
@Nullable
|
||||
private String contextConfigLocation;
|
||||
|
||||
/** Actual ApplicationContextInitializer instances to apply to the context */
|
||||
/** Actual ApplicationContextInitializer instances to apply to the context. */
|
||||
private final List<ApplicationContextInitializer<ConfigurableApplicationContext>> contextInitializers =
|
||||
new ArrayList<>();
|
||||
|
||||
/** Comma-delimited ApplicationContextInitializer class names set through init param */
|
||||
/** Comma-delimited ApplicationContextInitializer class names set through init param. */
|
||||
@Nullable
|
||||
private String contextInitializerClasses;
|
||||
|
||||
/** Should we publish the context as a ServletContext attribute? */
|
||||
/** Should we publish the context as a ServletContext attribute?. */
|
||||
private boolean publishContext = true;
|
||||
|
||||
/** Should we publish a ServletRequestHandledEvent at the end of each request? */
|
||||
/** Should we publish a ServletRequestHandledEvent at the end of each request?. */
|
||||
private boolean publishEvents = true;
|
||||
|
||||
/** Expose LocaleContext and RequestAttributes as inheritable for child threads? */
|
||||
/** Expose LocaleContext and RequestAttributes as inheritable for child threads?. */
|
||||
private boolean threadContextInheritable = false;
|
||||
|
||||
/** Should we dispatch an HTTP OPTIONS request to {@link #doService}? */
|
||||
/** Should we dispatch an HTTP OPTIONS request to {@link #doService}?. */
|
||||
private boolean dispatchOptionsRequest = false;
|
||||
|
||||
/** Should we dispatch an HTTP TRACE request to {@link #doService}? */
|
||||
/** Should we dispatch an HTTP TRACE request to {@link #doService}?. */
|
||||
private boolean dispatchTraceRequest = false;
|
||||
|
||||
/** WebApplicationContext for this servlet */
|
||||
/** WebApplicationContext for this servlet. */
|
||||
@Nullable
|
||||
private WebApplicationContext webApplicationContext;
|
||||
|
||||
/** If the WebApplicationContext was injected via {@link #setApplicationContext} */
|
||||
/** If the WebApplicationContext was injected via {@link #setApplicationContext}. */
|
||||
private boolean webApplicationContextInjected = false;
|
||||
|
||||
/** Flag used to detect whether onRefresh has already been called */
|
||||
/** Flag used to detect whether onRefresh has already been called. */
|
||||
private boolean refreshEventReceived = false;
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ public abstract class FrameworkServlet extends HttpServletBean implements Applic
|
||||
* <li>{@code ServletContext} and {@code ServletConfig} objects will be delegated to
|
||||
* the application context</li>
|
||||
* <li>{@link #postProcessWebApplicationContext} will be called</li>
|
||||
* <li>Any {@link ApplicationContextInitializer}s specified through the
|
||||
* <li>Any {@link ApplicationContextInitializer ApplicationContextInitializers} specified through the
|
||||
* "contextInitializerClasses" init-param or through the {@link
|
||||
* #setContextInitializers} property will be applied.</li>
|
||||
* <li>{@link ConfigurableApplicationContext#refresh refresh()} will be called</li>
|
||||
@@ -696,7 +696,7 @@ public abstract class FrameworkServlet extends HttpServletBean implements Applic
|
||||
* <p>Note that this method is designed to allow subclasses to modify the application
|
||||
* context, while {@link #initWebApplicationContext} is designed to allow
|
||||
* end-users to modify the context through the use of
|
||||
* {@link ApplicationContextInitializer}s.
|
||||
* {@link ApplicationContextInitializer ApplicationContextInitializers}.
|
||||
* @param wac the configured WebApplicationContext (not refreshed yet)
|
||||
* @see #createWebApplicationContext
|
||||
* @see #initWebApplicationContext
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -71,7 +71,7 @@ public interface HandlerAdapter {
|
||||
* to the {@code supports} method of this interface, which must have
|
||||
* returned {@code true}.
|
||||
* @throws Exception in case of errors
|
||||
* @return ModelAndView object with the name of the view and the required
|
||||
* @return a ModelAndView object with the name of the view and the required
|
||||
* model data, or {@code null} if the request has been handled directly
|
||||
*/
|
||||
@Nullable
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -81,7 +81,7 @@ import org.springframework.web.context.support.StandardServletEnvironment;
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class HttpServletBean extends HttpServlet implements EnvironmentCapable, EnvironmentAware {
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
@Nullable
|
||||
@@ -216,7 +216,7 @@ public abstract class HttpServletBean extends HttpServlet implements Environment
|
||||
|
||||
/**
|
||||
* Create new ServletConfigPropertyValues.
|
||||
* @param config ServletConfig we'll use to take PropertyValues from
|
||||
* @param config the ServletConfig we'll use to take PropertyValues from
|
||||
* @param requiredProperties set of property names we need, where
|
||||
* we can't accept default values
|
||||
* @throws ServletException if any required properties are missing
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,19 +46,19 @@ import org.springframework.util.CollectionUtils;
|
||||
*/
|
||||
public class ModelAndView {
|
||||
|
||||
/** View instance or view name String */
|
||||
/** View instance or view name String. */
|
||||
@Nullable
|
||||
private Object view;
|
||||
|
||||
/** Model Map */
|
||||
/** Model Map. */
|
||||
@Nullable
|
||||
private ModelMap model;
|
||||
|
||||
/** Optional HTTP status for the response */
|
||||
/** Optional HTTP status for the response. */
|
||||
@Nullable
|
||||
private HttpStatus status;
|
||||
|
||||
/** Indicates whether or not this instance has been cleared with a call to {@link #clear()} */
|
||||
/** Indicates whether or not this instance has been cleared with a call to {@link #clear()}. */
|
||||
private boolean cleared = false;
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public class ModelAndView {
|
||||
/**
|
||||
* Convenient constructor when there is no model data to expose.
|
||||
* Can also be used in conjunction with {@code addObject}.
|
||||
* @param view View object to render
|
||||
* @param view the View object to render
|
||||
* @see #addObject
|
||||
*/
|
||||
public ModelAndView(View view) {
|
||||
@@ -96,7 +96,7 @@ public class ModelAndView {
|
||||
* Create a new ModelAndView given a view name and a model.
|
||||
* @param viewName name of the View to render, to be resolved
|
||||
* by the DispatcherServlet's ViewResolver
|
||||
* @param model Map of model names (Strings) to model objects
|
||||
* @param model a Map of model names (Strings) to model objects
|
||||
* (Objects). Model entries may not be {@code null}, but the
|
||||
* model Map may be {@code null} if there is no model data.
|
||||
*/
|
||||
@@ -109,11 +109,11 @@ public class ModelAndView {
|
||||
|
||||
/**
|
||||
* Create a new ModelAndView given a View object and a model.
|
||||
* <emphasis>Note: the supplied model data is copied into the internal
|
||||
* <em>Note: the supplied model data is copied into the internal
|
||||
* storage of this class. You should not consider to modify the supplied
|
||||
* Map after supplying it to this class</emphasis>
|
||||
* @param view View object to render
|
||||
* @param model Map of model names (Strings) to model objects
|
||||
* Map after supplying it to this class</em>
|
||||
* @param view the View object to render
|
||||
* @param model a Map of model names (Strings) to model objects
|
||||
* (Objects). Model entries may not be {@code null}, but the
|
||||
* model Map may be {@code null} if there is no model data.
|
||||
*/
|
||||
@@ -141,7 +141,7 @@ public class ModelAndView {
|
||||
* Create a new ModelAndView given a view name, model, and HTTP status.
|
||||
* @param viewName name of the View to render, to be resolved
|
||||
* by the DispatcherServlet's ViewResolver
|
||||
* @param model Map of model names (Strings) to model objects
|
||||
* @param model a Map of model names (Strings) to model objects
|
||||
* (Objects). Model entries may not be {@code null}, but the
|
||||
* model Map may be {@code null} if there is no model data.
|
||||
* @param status an HTTP status code to use for the response
|
||||
@@ -170,7 +170,7 @@ public class ModelAndView {
|
||||
|
||||
/**
|
||||
* Convenient constructor to take a single model object.
|
||||
* @param view View object to render
|
||||
* @param view the View object to render
|
||||
* @param modelName name of the single entry in the model
|
||||
* @param modelObject the single model object
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,7 +41,7 @@ public class ModelAndViewDefiningException extends ServletException {
|
||||
/**
|
||||
* Create new ModelAndViewDefiningException with the given ModelAndView,
|
||||
* typically representing a specific error page.
|
||||
* @param modelAndView ModelAndView with view to forward to and model to expose
|
||||
* @param modelAndView the ModelAndView with view to forward to and model to expose
|
||||
*/
|
||||
public ModelAndViewDefiningException(ModelAndView modelAndView) {
|
||||
Assert.notNull(modelAndView, "ModelAndView must not be null in ModelAndViewDefiningException");
|
||||
|
||||
@@ -87,10 +87,10 @@ public interface View {
|
||||
* <p>The first step will be preparing the request: In the JSP case, this would mean
|
||||
* setting model objects as request attributes. The second step will be the actual
|
||||
* rendering of the view, for example including the JSP via a RequestDispatcher.
|
||||
* @param model Map with name Strings as keys and corresponding model
|
||||
* @param model a Map with name Strings as keys and corresponding model
|
||||
* objects as values (Map can also be {@code null} in case of empty model)
|
||||
* @param request current HTTP request
|
||||
* @param response HTTP response we are building
|
||||
* @param response he HTTP response we are building
|
||||
* @throws Exception if rendering failed
|
||||
*/
|
||||
void render(@Nullable Map<String, ?> model, HttpServletRequest request, HttpServletResponse response)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -45,7 +45,7 @@ public interface ViewResolver {
|
||||
* to build View objects with the given name, unable to return {@code null}
|
||||
* (rather throwing an exception when View creation failed).
|
||||
* @param viewName name of the view to resolve
|
||||
* @param locale Locale in which to resolve the view.
|
||||
* @param locale the Locale in which to resolve the view.
|
||||
* ViewResolvers that support internationalization should respect this.
|
||||
* @return the View object, or {@code null} if not found
|
||||
* (optional, to allow for ViewResolver chaining)
|
||||
|
||||
@@ -89,7 +89,7 @@ import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolv
|
||||
* A {@link BeanDefinitionParser} that provides the configuration for the
|
||||
* {@code <annotation-driven/>} MVC namespace element.
|
||||
*
|
||||
* <p>This class registers the following {@link HandlerMapping}s:</p>
|
||||
* <p>This class registers the following {@link HandlerMapping HandlerMappings}:</p>
|
||||
* <ul>
|
||||
* <li>{@link RequestMappingHandlerMapping}
|
||||
* ordered at 0 for mapping requests to annotated controller methods.
|
||||
@@ -101,17 +101,17 @@ import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolv
|
||||
* as a result of using the {@code <view-controller>} or the
|
||||
* {@code <resources>} MVC namespace elements.
|
||||
*
|
||||
* <p>This class registers the following {@link HandlerAdapter}s:
|
||||
* <p>This class registers the following {@link HandlerAdapter HandlerAdapters}:
|
||||
* <ul>
|
||||
* <li>{@link RequestMappingHandlerAdapter}
|
||||
* for processing requests with annotated controller methods.
|
||||
* <li>{@link HttpRequestHandlerAdapter}
|
||||
* for processing requests with {@link HttpRequestHandler}s.
|
||||
* for processing requests with {@link HttpRequestHandler HttpRequestHandlers}.
|
||||
* <li>{@link SimpleControllerHandlerAdapter}
|
||||
* for processing requests with interface-based {@link Controller}s.
|
||||
* for processing requests with interface-based {@link Controller Controllers}.
|
||||
* </ul>
|
||||
*
|
||||
* <p>This class registers the following {@link HandlerExceptionResolver}s:
|
||||
* <p>This class registers the following {@link HandlerExceptionResolver HandlerExceptionResolvers}:
|
||||
* <ul>
|
||||
* <li>{@link ExceptionHandlerExceptionResolver} for handling exceptions through
|
||||
* {@link org.springframework.web.bind.annotation.ExceptionHandler} methods.
|
||||
@@ -139,7 +139,7 @@ import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolv
|
||||
* <li>A {@link DefaultFormattingConversionService}
|
||||
* <li>A {@link org.springframework.validation.beanvalidation.LocalValidatorFactoryBean}
|
||||
* if a JSR-303 implementation is available on the classpath
|
||||
* <li>A range of {@link HttpMessageConverter}s depending on which third-party
|
||||
* <li>A range of {@link HttpMessageConverter HttpMessageConverters} depending on which third-party
|
||||
* libraries are available on the classpath.
|
||||
* </ul>
|
||||
*
|
||||
|
||||
@@ -29,14 +29,17 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
|
||||
/**
|
||||
* Parse the <mvc:freemarker-configurer> MVC namespace element and register
|
||||
* FreeMarkerConfigurer bean
|
||||
* Parse the <code><mvc:freemarker-configurer></code> MVC namespace element and
|
||||
* register {@code FreeMarkerConfigurer} bean.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.1
|
||||
*/
|
||||
public class FreeMarkerConfigurerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
|
||||
|
||||
/**
|
||||
* The bean name used for the {@code FreeMarkerConfigurer}.
|
||||
*/
|
||||
public static final String BEAN_NAME = "mvcFreeMarkerConfigurer";
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,14 +23,17 @@ import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
|
||||
/**
|
||||
* Parse the <mvc:groovy-configurer> MVC namespace element and register a
|
||||
* GroovyConfigurer bean
|
||||
* Parse the <code><mvc:groovy-configurer></code> MVC namespace element and register a
|
||||
* {@code GroovyConfigurer} bean.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 4.1
|
||||
*/
|
||||
public class GroovyMarkupConfigurerBeanDefinitionParser extends AbstractSimpleBeanDefinitionParser {
|
||||
|
||||
/**
|
||||
* The bean name used for the {@code GroovyMarkupConfigurer}.
|
||||
*/
|
||||
public static final String BEAN_NAME = "mvcGroovyMarkupConfigurer";
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ import org.springframework.web.servlet.resource.WebJarsResourceResolver;
|
||||
* {@code resources} element to register a {@link ResourceHttpRequestHandler} and
|
||||
* register a {@link SimpleUrlHandlerMapping} for mapping resource requests,
|
||||
* and a {@link HttpRequestHandlerAdapter}. Will also create a resource handling
|
||||
* chain with {@link ResourceResolver}s and {@link ResourceTransformer}s.
|
||||
* chain with {@link ResourceResolver}s and {@link ResourceTransformer ResourceResolver}s and {@link ResourceTransformers}.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @author Jeremy Grelle
|
||||
|
||||
@@ -30,14 +30,17 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
|
||||
/**
|
||||
* Parse the <mvc:script-template-configurer> MVC namespace element and register a
|
||||
* {@code ScriptTemplateConfigurer} bean.
|
||||
* Parse the <code><mvc:script-template-configurer></code> MVC namespace element and
|
||||
* register a {@code ScriptTemplateConfigurer} bean.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 4.2
|
||||
*/
|
||||
public class ScriptTemplateConfigurerBeanDefinitionParser extends AbstractSimpleBeanDefinitionParser {
|
||||
|
||||
/**
|
||||
* The bean name used for the {@code ScriptTemplateConfigurer}.
|
||||
*/
|
||||
public static final String BEAN_NAME = "mvcScriptTemplateConfigurer";
|
||||
|
||||
|
||||
|
||||
@@ -29,15 +29,18 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
|
||||
/**
|
||||
* Parse the <mvc:tiles-configurer> MVC namespace element and register
|
||||
* a corresponding TilesConfigurer bean.
|
||||
|
||||
* Parse the <code><mvc:tiles-configurer></code> MVC namespace element and register
|
||||
* a corresponding {@code TilesConfigurer} bean.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Juergen Hoeller
|
||||
* @since 4.1
|
||||
*/
|
||||
public class TilesConfigurerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
|
||||
|
||||
/**
|
||||
* The bean name used for the {@code TilesConfigurer}.
|
||||
*/
|
||||
public static final String BEAN_NAME = "mvcTilesConfigurer";
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -63,6 +63,9 @@ import org.springframework.web.servlet.view.tiles3.TilesViewResolver;
|
||||
*/
|
||||
public class ViewResolversBeanDefinitionParser implements BeanDefinitionParser {
|
||||
|
||||
/**
|
||||
* The bean name used for the {@code ViewResolverComposite}.
|
||||
*/
|
||||
public static final String VIEW_RESOLVER_BEAN_NAME = "mvcViewResolver";
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -186,6 +186,9 @@ public class ContentNegotiationConfigurer {
|
||||
}
|
||||
|
||||
/**
|
||||
* When {@link #favorPathExtension} is set, this property determines whether
|
||||
* to allow use of JAF (Java Activation Framework) to resolve a path
|
||||
* extension to a specific MediaType.
|
||||
* @deprecated as of 5.0, in favor of {@link #useRegisteredExtensionsOnly(boolean)}
|
||||
* which has reverse behavior
|
||||
*/
|
||||
@@ -253,8 +256,8 @@ public class ContentNegotiationConfigurer {
|
||||
* Set a custom {@link ContentNegotiationStrategy} to use to determine
|
||||
* the content type to use when no content type is requested.
|
||||
* <p>By default this is not set.
|
||||
* @see #defaultContentType
|
||||
* @since 4.1.2
|
||||
* @see #defaultContentType
|
||||
*/
|
||||
public ContentNegotiationConfigurer defaultContentTypeStrategy(ContentNegotiationStrategy defaultStrategy) {
|
||||
this.factory.setDefaultContentTypeStrategy(defaultStrategy);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,7 +42,7 @@ public class InterceptorRegistry {
|
||||
/**
|
||||
* Adds the provided {@link HandlerInterceptor}.
|
||||
* @param interceptor the interceptor to add
|
||||
* @return An {@link InterceptorRegistration} that allows you optionally configure the
|
||||
* @return an {@link InterceptorRegistration} that allows you optionally configure the
|
||||
* registered interceptor further for example adding URL patterns it should apply to.
|
||||
*/
|
||||
public InterceptorRegistration addInterceptor(HandlerInterceptor interceptor) {
|
||||
@@ -54,7 +54,7 @@ public class InterceptorRegistry {
|
||||
/**
|
||||
* Adds the provided {@link WebRequestInterceptor}.
|
||||
* @param interceptor the interceptor to add
|
||||
* @return An {@link InterceptorRegistration} that allows you optionally configure the
|
||||
* @return an {@link InterceptorRegistration} that allows you optionally configure the
|
||||
* registered interceptor further for example adding URL patterns it should apply to.
|
||||
*/
|
||||
public InterceptorRegistration addWebRequestInterceptor(WebRequestInterceptor interceptor) {
|
||||
|
||||
@@ -136,7 +136,7 @@ public class ResourceHandlerRegistry {
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the order to use for resource handling relative to other {@link HandlerMapping}s
|
||||
* Specify the order to use for resource handling relative to other {@link HandlerMapping HandlerMappings}
|
||||
* configured in the Spring MVC application context.
|
||||
* <p>The default value used is {@code Integer.MAX_VALUE-1}.
|
||||
*/
|
||||
|
||||
@@ -108,7 +108,7 @@ import org.springframework.web.util.UrlPathHelper;
|
||||
* subclass and {@link Bean @Bean} to overridden {@link Bean @Bean} methods.
|
||||
* For more details see the javadoc of {@link EnableWebMvc @EnableWebMvc}.
|
||||
*
|
||||
* <p>This class registers the following {@link HandlerMapping}s:</p>
|
||||
* <p>This class registers the following {@link HandlerMapping HandlerMappings}:</p>
|
||||
* <ul>
|
||||
* <li>{@link RequestMappingHandlerMapping}
|
||||
* ordered at 0 for mapping requests to annotated controller methods.
|
||||
@@ -122,14 +122,14 @@ import org.springframework.web.util.UrlPathHelper;
|
||||
* ordered at {@code Integer.MAX_VALUE} to forward requests to the default servlet.
|
||||
* </ul>
|
||||
*
|
||||
* <p>Registers these {@link HandlerAdapter}s:
|
||||
* <p>Registers these {@link HandlerAdapter HandlerAdapters}:
|
||||
* <ul>
|
||||
* <li>{@link RequestMappingHandlerAdapter}
|
||||
* for processing requests with annotated controller methods.
|
||||
* <li>{@link HttpRequestHandlerAdapter}
|
||||
* for processing requests with {@link HttpRequestHandler}s.
|
||||
* for processing requests with {@link HttpRequestHandler HttpRequestHandlers}.
|
||||
* <li>{@link SimpleControllerHandlerAdapter}
|
||||
* for processing requests with interface-based {@link Controller}s.
|
||||
* for processing requests with interface-based {@link Controller Controllers}.
|
||||
* </ul>
|
||||
*
|
||||
* <p>Registers a {@link HandlerExceptionResolverComposite} with this chain of
|
||||
@@ -160,7 +160,7 @@ import org.springframework.web.util.UrlPathHelper;
|
||||
* <li>a {@link DefaultFormattingConversionService}
|
||||
* <li>a {@link org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean}
|
||||
* if a JSR-303 implementation is available on the classpath
|
||||
* <li>a range of {@link HttpMessageConverter}s depending on the third-party
|
||||
* <li>a range of {@link HttpMessageConverter HttpMessageConverters} depending on the third-party
|
||||
* libraries available on the classpath.
|
||||
* </ul>
|
||||
*
|
||||
@@ -367,15 +367,15 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
|
||||
/**
|
||||
* Override this method to configure path matching options.
|
||||
* @see PathMatchConfigurer
|
||||
* @since 4.0.3
|
||||
* @see PathMatchConfigurer
|
||||
*/
|
||||
protected void configurePathMatch(PathMatchConfigurer configurer) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a global {@link PathMatcher} instance for path matching
|
||||
* patterns in {@link HandlerMapping}s.
|
||||
* patterns in {@link HandlerMapping HandlerMappings}.
|
||||
* This instance can be configured using the {@link PathMatchConfigurer}
|
||||
* in {@link #configurePathMatch(PathMatchConfigurer)}.
|
||||
* @since 4.1
|
||||
@@ -388,7 +388,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
|
||||
/**
|
||||
* Return a global {@link UrlPathHelper} instance for path matching
|
||||
* patterns in {@link HandlerMapping}s.
|
||||
* patterns in {@link HandlerMapping HandlerMappings}.
|
||||
* This instance can be configured using the {@link PathMatchConfigurer}
|
||||
* in {@link #configurePathMatch(PathMatchConfigurer)}.
|
||||
* @since 4.1
|
||||
@@ -645,7 +645,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
}
|
||||
|
||||
/**
|
||||
* Override this method to add custom {@link Converter}s and {@link Formatter}s.
|
||||
* Override this method to add custom {@link Converter}s and {@link Formatter Converter}s and {@link Formatters}.
|
||||
*/
|
||||
protected void addFormatters(FormatterRegistry registry) {
|
||||
}
|
||||
@@ -704,7 +704,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
}
|
||||
|
||||
/**
|
||||
* Add custom {@link HandlerMethodArgumentResolver}s to use in addition to
|
||||
* Add custom {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers} to use in addition to
|
||||
* the ones registered by default.
|
||||
* <p>Custom argument resolvers are invoked before built-in resolvers
|
||||
* except for those that rely on the presence of annotations (e.g.
|
||||
@@ -733,7 +733,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
}
|
||||
|
||||
/**
|
||||
* Add custom {@link HandlerMethodReturnValueHandler}s in addition to the
|
||||
* Add custom {@link HandlerMethodReturnValueHandler HandlerMethodReturnValueHandlers} in addition to the
|
||||
* ones registered by default.
|
||||
* <p>Custom return value handlers are invoked before built-in ones except
|
||||
* for those that rely on the presence of annotations (e.g.
|
||||
@@ -747,7 +747,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides access to the shared {@link HttpMessageConverter}s used by the
|
||||
* Provides access to the shared {@link HttpMessageConverter HttpMessageConverters} used by the
|
||||
* {@link RequestMappingHandlerAdapter} and the
|
||||
* {@link ExceptionHandlerExceptionResolver}.
|
||||
* This method cannot be overridden.
|
||||
@@ -768,7 +768,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
}
|
||||
|
||||
/**
|
||||
* Override this method to add custom {@link HttpMessageConverter}s to use
|
||||
* Override this method to add custom {@link HttpMessageConverter HttpMessageConverters} to use
|
||||
* with the {@link RequestMappingHandlerAdapter} and the
|
||||
* {@link ExceptionHandlerExceptionResolver}. Adding converters to the
|
||||
* list turns off the default converters that would otherwise be registered
|
||||
@@ -866,7 +866,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
|
||||
/**
|
||||
* Returns a {@link HttpRequestHandlerAdapter} for processing requests
|
||||
* with {@link HttpRequestHandler}s.
|
||||
* with {@link HttpRequestHandler HttpRequestHandlers}.
|
||||
*/
|
||||
@Bean
|
||||
public HttpRequestHandlerAdapter httpRequestHandlerAdapter() {
|
||||
@@ -908,7 +908,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
|
||||
/**
|
||||
* Override this method to configure the list of
|
||||
* {@link HandlerExceptionResolver}s to use. Adding resolvers to the list
|
||||
* {@link HandlerExceptionResolver HandlerExceptionResolvers} to use. Adding resolvers to the list
|
||||
* turns off the default resolvers that would otherwise be registered by
|
||||
* default. Also see {@link #addDefaultHandlerExceptionResolvers(List)}
|
||||
* that can be used to add the default exception resolvers.
|
||||
@@ -920,7 +920,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
|
||||
/**
|
||||
* Override this method to extend or modify the list of
|
||||
* {@link HandlerExceptionResolver}s after it has been configured. This may
|
||||
* {@link HandlerExceptionResolver HandlerExceptionResolvers} after it has been configured. This may
|
||||
* be useful for example to allow default resolvers to be registered and then
|
||||
* insert a custom one through this method.
|
||||
* @param exceptionResolvers the list of configured resolvers to extend.
|
||||
@@ -930,7 +930,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
}
|
||||
|
||||
/**
|
||||
* A method available to subclasses for adding default {@link HandlerExceptionResolver}s.
|
||||
* A method available to subclasses for adding default {@link HandlerExceptionResolver HandlerExceptionResolvers}.
|
||||
* <p>Adds the following exception resolvers:
|
||||
* <ul>
|
||||
* <li>{@link ExceptionHandlerExceptionResolver} for handling exceptions through
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -82,7 +82,7 @@ public interface WebMvcConfigurer {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add {@link Converter}s and {@link Formatter}s in addition to the ones
|
||||
* Add {@link Converter}s and {@link Formatter Converter}s and {@link Formatters} in addition to the ones
|
||||
* registered by default.
|
||||
*/
|
||||
default void addFormatters(FormatterRegistry registry) {
|
||||
@@ -158,7 +158,7 @@ public interface WebMvcConfigurer {
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the {@link HttpMessageConverter}s to use for reading or writing
|
||||
* Configure the {@link HttpMessageConverter HttpMessageConverters} to use for reading or writing
|
||||
* to the body of the request or response. If no converters are added, a
|
||||
* default list of converters is registered.
|
||||
* <p><strong>Note</strong> that adding converters to the list, turns off
|
||||
|
||||
@@ -45,7 +45,7 @@ public abstract class AbstractHandlerExceptionResolver implements HandlerExcepti
|
||||
private static final String HEADER_CACHE_CONTROL = "Cache-Control";
|
||||
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private int order = Ordered.LOWEST_PRECEDENCE;
|
||||
|
||||
@@ -273,7 +273,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
|
||||
|
||||
/**
|
||||
* Detect beans of type {@link MappedInterceptor} and add them to the list of mapped interceptors.
|
||||
* <p>This is called in addition to any {@link MappedInterceptor}s that may have been provided
|
||||
* <p>This is called in addition to any {@link MappedInterceptor MappedInterceptors} that may have been provided
|
||||
* via {@link #setInterceptors}, by default adding all beans of type {@link MappedInterceptor}
|
||||
* from the current context and its ancestors. Subclasses can override and refine this policy.
|
||||
* @param mappedInterceptors an empty list to add {@link MappedInterceptor} instances to
|
||||
@@ -285,8 +285,8 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the specified interceptors, checking for {@link MappedInterceptor}s and
|
||||
* adapting {@link HandlerInterceptor}s and {@link WebRequestInterceptor}s if necessary.
|
||||
* Initialize the specified interceptors, checking for {@link MappedInterceptor MappedInterceptors} and
|
||||
* adapting {@link HandlerInterceptor}s and {@link WebRequestInterceptor HandlerInterceptor}s and {@link WebRequestInterceptors} if necessary.
|
||||
* @see #setInterceptors
|
||||
* @see #adaptInterceptor
|
||||
*/
|
||||
@@ -328,7 +328,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
|
||||
|
||||
/**
|
||||
* Return the adapted interceptors as {@link HandlerInterceptor} array.
|
||||
* @return the array of {@link HandlerInterceptor}s, or {@code null} if none
|
||||
* @return the array of {@link HandlerInterceptor HandlerInterceptors}, or {@code null} if none
|
||||
*/
|
||||
@Nullable
|
||||
protected final HandlerInterceptor[] getAdaptedInterceptors() {
|
||||
@@ -337,8 +337,8 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all configured {@link MappedInterceptor}s as an array.
|
||||
* @return the array of {@link MappedInterceptor}s, or {@code null} if none
|
||||
* Return all configured {@link MappedInterceptor MappedInterceptors} as an array.
|
||||
* @return the array of {@link MappedInterceptor MappedInterceptors}, or {@code null} if none
|
||||
*/
|
||||
@Nullable
|
||||
protected final MappedInterceptor[] getMappedInterceptors() {
|
||||
@@ -418,7 +418,7 @@ public abstract class AbstractHandlerMapping extends WebApplicationObjectSupport
|
||||
* applicable interceptors.
|
||||
* <p>The default implementation builds a standard {@link HandlerExecutionChain}
|
||||
* with the given handler, the handler mapping's common interceptors, and any
|
||||
* {@link MappedInterceptor}s matching to the current request URL. Interceptors
|
||||
* {@link MappedInterceptor MappedInterceptors} matching to the current request URL. Interceptors
|
||||
* are added in the order they were registered. Subclasses may override this
|
||||
* in order to extend/rearrange the list of interceptors.
|
||||
* <p><b>NOTE:</b> The passed-in handler object may be a raw handler or a
|
||||
|
||||
@@ -59,7 +59,7 @@ import org.springframework.web.servlet.HandlerMapping;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.1
|
||||
* @param <T> The mapping for a {@link HandlerMethod} containing the conditions
|
||||
* @param <T> the mapping for a {@link HandlerMethod} containing the conditions
|
||||
* needed to match the handler method to incoming request.
|
||||
*/
|
||||
public abstract class AbstractHandlerMethodMapping<T> extends AbstractHandlerMapping implements InitializingBean {
|
||||
|
||||
@@ -151,7 +151,7 @@ public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping i
|
||||
* both "/test" and "/team". For details, see the AntPathMatcher class.
|
||||
* <p>Looks for the most exact pattern, where most exact is defined as
|
||||
* the longest path pattern.
|
||||
* @param urlPath URL the bean is mapped to
|
||||
* @param urlPath the URL the bean is mapped to
|
||||
* @param request current HTTP request (to expose the path within the mapping to)
|
||||
* @return the associated handler instance, or {@code null} if not found
|
||||
* @see #exposePathWithinMapping
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.web.servlet.HandlerExceptionResolver;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
/**
|
||||
* A {@link HandlerExceptionResolver} that delegates to a list of other {@link HandlerExceptionResolver}s.
|
||||
* A {@link HandlerExceptionResolver} that delegates to a list of other {@link HandlerExceptionResolver HandlerExceptionResolver} that delegates to a list of other {@link HandlerExceptionResolvers}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,6 +36,7 @@ import org.springframework.web.method.HandlerMethod;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.1
|
||||
* @param <T> the mapping type
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface HandlerMethodMappingNamingStrategy<T> {
|
||||
|
||||
@@ -144,7 +144,7 @@ public class SimpleMappingExceptionResolver extends AbstractHandlerExceptionReso
|
||||
* from within an include.
|
||||
* <p>If not specified, no status code will be applied, either leaving this to the
|
||||
* controller or view, or keeping the servlet engine's default of 200 (OK).
|
||||
* @param defaultStatusCode HTTP status code value, for example 500
|
||||
* @param defaultStatusCode the HTTP status code value, for example 500
|
||||
* ({@link HttpServletResponse#SC_INTERNAL_SERVER_ERROR}) or 404 ({@link HttpServletResponse#SC_NOT_FOUND})
|
||||
* @see #setStatusCodes(Properties)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -108,7 +108,7 @@ public class SimpleUrlHandlerMapping extends AbstractUrlHandlerMapping {
|
||||
|
||||
/**
|
||||
* Register all handlers specified in the URL map for the corresponding paths.
|
||||
* @param urlMap Map with URL paths as keys and handler beans or bean names as values
|
||||
* @param urlMap a Map with URL paths as keys and handler beans or bean names as values
|
||||
* @throws BeansException if a handler couldn't be registered
|
||||
* @throws IllegalStateException if there is a conflicting handler registered
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,7 +30,7 @@ import org.springframework.web.util.WebUtils;
|
||||
* Convenient superclass for controller implementations, using the Template Method
|
||||
* design pattern.
|
||||
*
|
||||
* <p><b><a name="workflow">Workflow
|
||||
* <p><b>Workflow
|
||||
* (<a href="Controller.html#workflow">and that defined by interface</a>):</b><br>
|
||||
* <ol>
|
||||
* <li>{@link #handleRequest(HttpServletRequest, HttpServletResponse) handleRequest()}
|
||||
@@ -50,7 +50,7 @@ import org.springframework.web.util.WebUtils;
|
||||
* (<a href="Controller.html#config">and those defined by interface</a>):</b><br>
|
||||
* <table border="1">
|
||||
* <tr>
|
||||
* <td><b>name</b></th>
|
||||
* <td><b>name</b></td>
|
||||
* <td><b>default</b></td>
|
||||
* <td><b>description</b></td>
|
||||
* </tr>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -53,7 +53,7 @@ public class UrlFilenameViewController extends AbstractUrlViewController {
|
||||
|
||||
private String suffix = "";
|
||||
|
||||
/** Request URL path String --> view name String */
|
||||
/** Request URL path String to view name String. */
|
||||
private final Map<String, String> viewNameCache = new ConcurrentHashMap<>(256);
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -138,7 +138,7 @@ public class WebContentInterceptor extends WebContentGenerator implements Handle
|
||||
* matches several mappings, it is effectively undefined which one will apply
|
||||
* (due to the lack of key ordering in the underlying {@code java.util.HashMap}).
|
||||
* @param cacheControl the {@code CacheControl} to use
|
||||
* @param paths URL paths that will map to the given {@code CacheControl}
|
||||
* @param paths the URL paths that will map to the given {@code CacheControl}
|
||||
* @since 4.2
|
||||
* @see #setCacheSeconds
|
||||
* @see org.springframework.util.AntPathMatcher
|
||||
@@ -200,7 +200,7 @@ public class WebContentInterceptor extends WebContentGenerator implements Handle
|
||||
* <p>Supports direct matches, e.g. a registered "/test" matches "/test",
|
||||
* and various Ant-style pattern matches, e.g. a registered "/t*" matches
|
||||
* both "/test" and "/team". For details, see the AntPathMatcher class.
|
||||
* @param urlPath URL the bean is mapped to
|
||||
* @param urlPath the URL the bean is mapped to
|
||||
* @return the associated {@code CacheControl}, or {@code null} if not found
|
||||
* @see org.springframework.util.AntPathMatcher
|
||||
*/
|
||||
@@ -225,7 +225,7 @@ public class WebContentInterceptor extends WebContentGenerator implements Handle
|
||||
* <p>Supports direct matches, e.g. a registered "/test" matches "/test",
|
||||
* and various Ant-style pattern matches, e.g. a registered "/t*" matches
|
||||
* both "/test" and "/team". For details, see the AntPathMatcher class.
|
||||
* @param urlPath URL the bean is mapped to
|
||||
* @param urlPath the URL the bean is mapped to
|
||||
* @return the cacheSeconds integer value, or {@code null} if not found
|
||||
* @see org.springframework.util.AntPathMatcher
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,6 +28,7 @@ import org.springframework.lang.Nullable;
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Arjen Poutsma
|
||||
* @since 3.1
|
||||
* @param <T> the value type
|
||||
*/
|
||||
abstract class AbstractNameValueExpression<T> implements NameValueExpression<T> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,6 +27,8 @@ import org.springframework.lang.Nullable;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.1
|
||||
* @param <T> the type of objects that this RequestCondition can be combined
|
||||
* with and compared to
|
||||
*/
|
||||
public abstract class AbstractRequestCondition<T extends AbstractRequestCondition<T>> implements RequestCondition<T> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.1
|
||||
* @param <T> the value type
|
||||
* @see RequestMapping#params()
|
||||
* @see RequestMapping#headers()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,7 +32,7 @@ import org.springframework.web.cors.CorsUtils;
|
||||
|
||||
/**
|
||||
* A logical disjunction (' || ') request condition that matches a request
|
||||
* against a set of {@link RequestMethod}s.
|
||||
* against a set of {@link RequestMethod RequestMethods}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Rossen Stoyanchev
|
||||
@@ -61,7 +61,7 @@ public final class RequestMethodsRequestCondition extends AbstractRequestConditi
|
||||
|
||||
|
||||
/**
|
||||
* Returns all {@link RequestMethod}s contained in this condition.
|
||||
* Returns all {@link RequestMethod RequestMethods} contained in this condition.
|
||||
*/
|
||||
public Set<RequestMethod> getMethods() {
|
||||
return this.methods;
|
||||
|
||||
@@ -93,7 +93,7 @@ public abstract class AbstractHandlerMethodAdapter extends WebContentGenerator i
|
||||
* @param response current HTTP response
|
||||
* @param handlerMethod handler method to use. This object must have previously been passed to the
|
||||
* {@link #supportsInternal(HandlerMethod)} this interface, which must have returned {@code true}.
|
||||
* @return ModelAndView object with the name of the view and the required model data,
|
||||
* @return a ModelAndView object with the name of the view and the required model data,
|
||||
* or {@code null} if the request has been handled directly
|
||||
* @throws Exception in case of errors
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,7 +36,7 @@ import org.springframework.web.servlet.mvc.condition.RequestMethodsRequestCondit
|
||||
import org.springframework.web.util.UrlPathHelper;
|
||||
|
||||
/**
|
||||
* A {@link RequestCondition} that consists of the following other conditions:
|
||||
* Request mapping information. Encapsulates the following request mapping conditions:
|
||||
* <ol>
|
||||
* <li>{@link PatternsRequestCondition}
|
||||
* <li>{@link RequestMethodsRequestCondition}
|
||||
|
||||
@@ -375,7 +375,8 @@ public abstract class RequestMappingInfoHandlerMapping extends AbstractHandlerMe
|
||||
private final boolean paramsMatch;
|
||||
|
||||
/**
|
||||
* @param info RequestMappingInfo that matches the URL path.
|
||||
* Create a new {@link PartialMatch} instance.
|
||||
* @param info the RequestMappingInfo that matches the URL path.
|
||||
* @param request the current request
|
||||
*/
|
||||
public PartialMatch(RequestMappingInfo info, HttpServletRequest request) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,7 +35,7 @@ import org.springframework.web.servlet.handler.HandlerMethodMappingNamingStrateg
|
||||
public class RequestMappingInfoHandlerMethodMappingNamingStrategy
|
||||
implements HandlerMethodMappingNamingStrategy<RequestMappingInfo> {
|
||||
|
||||
/** Separator between the type and method-level parts of a HandlerMethod mapping name */
|
||||
/** Separator between the type and method-level parts of a HandlerMethod mapping name. */
|
||||
public static final String SEPARATOR = "#";
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
||||
|
||||
/**
|
||||
* A base class for resolving method argument values by reading from the body of
|
||||
* a request with {@link HttpMessageConverter}s.
|
||||
* a request with {@link HttpMessageConverter HttpMessageConverters}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Rossen Stoyanchev
|
||||
|
||||
@@ -60,7 +60,7 @@ import org.springframework.web.util.UrlPathHelper;
|
||||
|
||||
/**
|
||||
* Extends {@link AbstractMessageConverterMethodArgumentResolver} with the ability to handle
|
||||
* method return values by writing to the response with {@link HttpMessageConverter}s.
|
||||
* method return values by writing to the response with {@link HttpMessageConverter HttpMessageConverters}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Rossen Stoyanchev
|
||||
@@ -315,7 +315,7 @@ public abstract class AbstractMessageConverterMethodProcessor extends AbstractMe
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the returned value or the declared return type extend {@link Resource}
|
||||
* Return whether the returned value or the declared return type extend {@link Resource}.
|
||||
*/
|
||||
protected boolean isResourceType(@Nullable Object value, MethodParameter returnType) {
|
||||
Class<?> clazz = getReturnValueType(value, returnType);
|
||||
@@ -336,6 +336,7 @@ public abstract class AbstractMessageConverterMethodProcessor extends AbstractMe
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the media types that can be produced.
|
||||
* @see #getProducibleMediaTypes(HttpServletRequest, Class, Type)
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@@ -344,7 +345,7 @@ public abstract class AbstractMessageConverterMethodProcessor extends AbstractMe
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the media types that can be produced:
|
||||
* Returns the media types that can be produced. The resulting media types are:
|
||||
* <ul>
|
||||
* <li>The producible media types specified in the request mappings, or
|
||||
* <li>Media types of configured converters that can write the specific return value, or
|
||||
|
||||
@@ -281,7 +281,7 @@ public class MvcUriComponentsBuilder {
|
||||
* class AddressController {
|
||||
*
|
||||
* @RequestMapping("/{country}")
|
||||
* public HttpEntity<Void> getAddressesForCountry(@PathVariable String country) { ... }
|
||||
* public HttpEntity<Void> getAddressesForCountry(@PathVariable String country) { ... }
|
||||
*
|
||||
* @RequestMapping(value="/", method=RequestMethod.POST)
|
||||
* public void addAddress(Address address) { ... }
|
||||
@@ -406,7 +406,7 @@ public class MvcUriComponentsBuilder {
|
||||
* class PersonController {
|
||||
*
|
||||
* @RequestMapping("/{id}")
|
||||
* public HttpEntity<Void> getPerson(@PathVariable String id) { ... }
|
||||
* public HttpEntity<Void> getPerson(@PathVariable String id) { ... }
|
||||
*
|
||||
* }
|
||||
* </pre>
|
||||
@@ -678,12 +678,24 @@ public class MvcUriComponentsBuilder {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Method invocation information.
|
||||
*/
|
||||
public interface MethodInvocationInfo {
|
||||
|
||||
/**
|
||||
* Return the controller types.
|
||||
*/
|
||||
Class<?> getControllerType();
|
||||
|
||||
/**
|
||||
* Return the controller method.
|
||||
*/
|
||||
Method getControllerMethod();
|
||||
|
||||
/**
|
||||
* Return the argument values.
|
||||
*/
|
||||
Object[] getArgumentValues();
|
||||
}
|
||||
|
||||
@@ -811,6 +823,9 @@ public class MvcUriComponentsBuilder {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Builder class to create URLs for method arguments.
|
||||
*/
|
||||
public static class MethodArgumentBuilder {
|
||||
|
||||
private final Class<?> controllerType;
|
||||
@@ -822,6 +837,7 @@ public class MvcUriComponentsBuilder {
|
||||
private final UriComponentsBuilder baseUrl;
|
||||
|
||||
/**
|
||||
* Create a new {@link MethodArgumentBuilder} instance.
|
||||
* @since 4.2
|
||||
*/
|
||||
public MethodArgumentBuilder(Class<?> controllerType, Method method) {
|
||||
@@ -829,6 +845,7 @@ public class MvcUriComponentsBuilder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new {@link MethodArgumentBuilder} instance.
|
||||
* @since 4.2
|
||||
*/
|
||||
public MethodArgumentBuilder(@Nullable UriComponentsBuilder baseUrl, Class<?> controllerType, Method method) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -246,7 +246,7 @@ class ReactiveTypeHandler {
|
||||
schedule();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void schedule() {
|
||||
try {
|
||||
this.taskExecutor.execute(this);
|
||||
@@ -261,7 +261,7 @@ class ReactiveTypeHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (this.done) {
|
||||
@@ -288,7 +288,7 @@ class ReactiveTypeHandler {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isTerminated) {
|
||||
this.done = true;
|
||||
Throwable ex = this.error;
|
||||
@@ -307,7 +307,7 @@ class ReactiveTypeHandler {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (this.executing.decrementAndGet() != 0) {
|
||||
schedule();
|
||||
}
|
||||
@@ -449,6 +449,9 @@ class ReactiveTypeHandler {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List of collect values where all elements are a specified type.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
static class CollectedValuesList extends ArrayList<Object> {
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ import org.springframework.web.util.WebUtils;
|
||||
|
||||
/**
|
||||
* Extension of {@link AbstractHandlerMethodAdapter} that supports
|
||||
* {@link RequestMapping} annotated {@code HandlerMethod}s.
|
||||
* {@link RequestMapping} annotated {@code HandlerMethod RequestMapping} annotated {@code HandlerMethods}.
|
||||
*
|
||||
* <p>Support for custom argument and return value types can be added via
|
||||
* {@link #setCustomArgumentResolvers} and {@link #setCustomReturnValueHandlers},
|
||||
@@ -292,7 +292,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide custom {@link ModelAndViewResolver}s.
|
||||
* Provide custom {@link ModelAndViewResolver ModelAndViewResolvers}.
|
||||
* <p><strong>Note:</strong> This method is available for backwards
|
||||
* compatibility only. However, it is recommended to re-write a
|
||||
* {@code ModelAndViewResolver} as {@link HandlerMethodReturnValueHandler}.
|
||||
@@ -310,7 +310,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the configured {@link ModelAndViewResolver}s, or {@code null}.
|
||||
* Return the configured {@link ModelAndViewResolver ModelAndViewResolvers}, or {@code null}.
|
||||
*/
|
||||
@Nullable
|
||||
public List<ModelAndViewResolver> getModelAndViewResolvers() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -87,11 +87,13 @@ public class RequestPartMethodArgumentResolver extends AbstractMessageConverterM
|
||||
|
||||
|
||||
/**
|
||||
* Supports the following:
|
||||
* Whether the given {@linkplain MethodParameter method parameter} is a multi-part
|
||||
* supported. Supports the following:
|
||||
* <ul>
|
||||
* <li>annotated with {@code @RequestPart}
|
||||
* <li>of type {@link MultipartFile} unless annotated with {@code @RequestParam}
|
||||
* <li>of type {@code javax.servlet.http.Part} unless annotated with {@code @RequestParam}
|
||||
* <li>of type {@code javax.servlet.http.Part} unless annotated with
|
||||
* {@code @RequestParam}
|
||||
* </ul>
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,6 +35,7 @@ import org.springframework.lang.Nullable;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.1
|
||||
* @param <T> the body type
|
||||
*/
|
||||
public interface ResponseBodyAdvice<T> {
|
||||
|
||||
|
||||
@@ -69,13 +69,13 @@ public class ResponseBodyEmitter {
|
||||
@Nullable
|
||||
private Handler handler;
|
||||
|
||||
/** Store send data before handler is initialized */
|
||||
/** Store send data before handler is initialized. */
|
||||
private final Set<DataWithMediaType> earlySendAttempts = new LinkedHashSet<>(8);
|
||||
|
||||
/** Store complete invocation before handler is initialized */
|
||||
/** Store complete invocation before handler is initialized. */
|
||||
private boolean complete;
|
||||
|
||||
/** Store completeWithError invocation before handler is initialized */
|
||||
/** Store completeWithError invocation before handler is initialized. */
|
||||
@Nullable
|
||||
private Throwable failure;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -91,7 +91,7 @@ public class ServletInvocableHandlerMethod extends InvocableHandlerMethod {
|
||||
|
||||
/**
|
||||
* Invoke the method and handle the return value through one of the
|
||||
* configured {@link HandlerMethodReturnValueHandler}s.
|
||||
* configured {@link HandlerMethodReturnValueHandler HandlerMethodReturnValueHandlers}.
|
||||
* @param webRequest the current request
|
||||
* @param mavContainer the ModelAndViewContainer for this request
|
||||
* @param providedArgs "given" arguments matched by type (not resolved)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,7 +41,8 @@ import org.springframework.web.multipart.MultipartRequest;
|
||||
import org.springframework.web.servlet.support.RequestContextUtils;
|
||||
|
||||
/**
|
||||
* Resolves request-related method argument values of the following types:
|
||||
* Resolves servlet backed request-related method arguments. Supports values of the
|
||||
* following types:
|
||||
* <ul>
|
||||
* <li>{@link WebRequest}
|
||||
* <li>{@link ServletRequest}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,8 @@ import org.springframework.web.method.support.HandlerMethodArgumentResolver;
|
||||
import org.springframework.web.method.support.ModelAndViewContainer;
|
||||
|
||||
/**
|
||||
* Resolves response-related method argument values of types:
|
||||
* Resolves servlet backed response-related method arguments. Supports values of the
|
||||
* following types:
|
||||
* <ul>
|
||||
* <li>{@link ServletResponse}
|
||||
* <li>{@link OutputStream}
|
||||
|
||||
@@ -42,8 +42,14 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
public class CachingResourceResolver extends AbstractResourceResolver {
|
||||
|
||||
/**
|
||||
* The prefix used for resolved resource cache keys.
|
||||
*/
|
||||
public static final String RESOLVED_RESOURCE_CACHE_KEY_PREFIX = "resolvedResource:";
|
||||
|
||||
/**
|
||||
* The prefix used for resolved URL path cache keys.
|
||||
*/
|
||||
public static final String RESOLVED_URL_PATH_CACHE_KEY_PREFIX = "resolvedUrlPath:";
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -123,6 +123,9 @@ public class CssLinkResourceTransformer extends ResourceTransformerSupport {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Abstract base class for {@link LinkParser} implementations.
|
||||
*/
|
||||
protected abstract static class AbstractLinkParser implements LinkParser {
|
||||
|
||||
/** Return the keyword to use to search for links, e.g. "@import", "url(" */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -52,19 +52,19 @@ import org.springframework.web.context.ServletContextAware;
|
||||
*/
|
||||
public class DefaultServletHttpRequestHandler implements HttpRequestHandler, ServletContextAware {
|
||||
|
||||
/** Default Servlet name used by Tomcat, Jetty, JBoss, and GlassFish */
|
||||
/** Default Servlet name used by Tomcat, Jetty, JBoss, and GlassFish. */
|
||||
private static final String COMMON_DEFAULT_SERVLET_NAME = "default";
|
||||
|
||||
/** Default Servlet name used by Google App Engine */
|
||||
/** Default Servlet name used by Google App Engine. */
|
||||
private static final String GAE_DEFAULT_SERVLET_NAME = "_ah_default";
|
||||
|
||||
/** Default Servlet name used by Resin */
|
||||
/** Default Servlet name used by Resin. */
|
||||
private static final String RESIN_DEFAULT_SERVLET_NAME = "resin-file";
|
||||
|
||||
/** Default Servlet name used by WebLogic */
|
||||
/** Default Servlet name used by WebLogic. */
|
||||
private static final String WEBLOGIC_DEFAULT_SERVLET_NAME = "FileServlet";
|
||||
|
||||
/** Default Servlet name used by WebSphere */
|
||||
/** Default Servlet name used by WebSphere. */
|
||||
private static final String WEBSPHERE_DEFAULT_SERVLET_NAME = "SimpleFileServlet";
|
||||
|
||||
|
||||
|
||||
@@ -53,6 +53,9 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class EncodedResourceResolver extends AbstractResourceResolver {
|
||||
|
||||
/**
|
||||
* The default content codings.
|
||||
*/
|
||||
public static final List<String> DEFAULT_CODINGS = Arrays.asList("br", "gzip");
|
||||
|
||||
|
||||
@@ -104,8 +107,8 @@ public class EncodedResourceResolver extends AbstractResourceResolver {
|
||||
* <p>By default this is configured with {@literal ["br" -> ".br"]} and
|
||||
* {@literal ["gzip" -> ".gz"]}.
|
||||
* @param extensions the extensions to use.
|
||||
* @see #registerExtension(String, String)
|
||||
* @since 5.1
|
||||
* @see #registerExtension(String, String)
|
||||
*/
|
||||
public void setExtensions(Map<String, String> extensions) {
|
||||
extensions.forEach(this::registerExtension);
|
||||
@@ -182,6 +185,9 @@ public class EncodedResourceResolver extends AbstractResourceResolver {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An encoded {@link HttpResource}.
|
||||
*/
|
||||
static final class EncodedResource extends AbstractResource implements HttpResource {
|
||||
|
||||
private final Resource original;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -80,6 +80,9 @@ public class GzipResourceResolver extends AbstractResourceResolver {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A gzipped {@link HttpResource}.
|
||||
*/
|
||||
static final class GzippedResource extends AbstractResource implements HttpResource {
|
||||
|
||||
private final Resource original;
|
||||
|
||||
@@ -184,7 +184,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the list of {@link ResourceResolver}s to use.
|
||||
* Configure the list of {@link ResourceResolver ResourceResolvers} to use.
|
||||
* <p>By default {@link PathResourceResolver} is configured. If using this property,
|
||||
* it is recommended to add {@link PathResourceResolver} as the last resolver.
|
||||
*/
|
||||
@@ -203,7 +203,7 @@ public class ResourceHttpRequestHandler extends WebContentGenerator
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the list of {@link ResourceTransformer}s to use.
|
||||
* Configure the list of {@link ResourceTransformer ResourceTransformers} to use.
|
||||
* <p>By default no transformers are configured for use.
|
||||
*/
|
||||
public void setResourceTransformers(@Nullable List<ResourceTransformer> resourceTransformers) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,7 +23,7 @@ import org.springframework.core.io.Resource;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* A contract for invoking a chain of {@link ResourceResolver}s where each resolver
|
||||
* A contract for invoking a chain of {@link ResourceResolver ResourceResolvers} where each resolver
|
||||
* is given a reference to the chain allowing it to delegate when necessary.
|
||||
*
|
||||
* @author Jeremy Grelle
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,7 +22,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
/**
|
||||
* A contract for invoking a chain of {@link ResourceTransformer}s where each resolver
|
||||
* A contract for invoking a chain of {@link ResourceTransformer ResourceTransformers} where each resolver
|
||||
* is given a reference to the chain allowing it to delegate when necessary.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
|
||||
@@ -66,7 +66,7 @@ public class VersionResourceResolver extends AbstractResourceResolver {
|
||||
|
||||
private AntPathMatcher pathMatcher = new AntPathMatcher();
|
||||
|
||||
/** Map from path pattern -> VersionStrategy */
|
||||
/** Map from path pattern -> VersionStrategy. */
|
||||
private final Map<String, VersionStrategy> versionStrategyMap = new LinkedHashMap<>();
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -614,7 +614,7 @@ public class RequestContext {
|
||||
/**
|
||||
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
|
||||
* @param code code of the message
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param defaultMessage the String to return if the lookup fails
|
||||
* @return the message
|
||||
*/
|
||||
public String getMessage(String code, String defaultMessage) {
|
||||
@@ -625,7 +625,7 @@ public class RequestContext {
|
||||
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message, or {@code null} if none
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param defaultMessage the String to return if the lookup fails
|
||||
* @return the message
|
||||
*/
|
||||
public String getMessage(String code, @Nullable Object[] args, String defaultMessage) {
|
||||
@@ -636,7 +636,7 @@ public class RequestContext {
|
||||
* Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message as a List, or {@code null} if none
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param defaultMessage the String to return if the lookup fails
|
||||
* @return the message
|
||||
*/
|
||||
public String getMessage(String code, @Nullable List<?> args, String defaultMessage) {
|
||||
@@ -647,8 +647,8 @@ public class RequestContext {
|
||||
* Retrieve the message for the given code.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message, or {@code null} if none
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param htmlEscape HTML escape the message?
|
||||
* @param defaultMessage the String to return if the lookup fails
|
||||
* @param htmlEscape if the message should be HTML-escaped
|
||||
* @return the message
|
||||
*/
|
||||
public String getMessage(String code, @Nullable Object[] args, String defaultMessage, boolean htmlEscape) {
|
||||
@@ -695,7 +695,7 @@ public class RequestContext {
|
||||
* Retrieve the message for the given code.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message, or {@code null} if none
|
||||
* @param htmlEscape HTML escape the message?
|
||||
* @param htmlEscape if the message should be HTML-escaped
|
||||
* @return the message
|
||||
* @throws org.springframework.context.NoSuchMessageException if not found
|
||||
*/
|
||||
@@ -717,7 +717,7 @@ public class RequestContext {
|
||||
/**
|
||||
* Retrieve the given MessageSourceResolvable (e.g. an ObjectError instance).
|
||||
* @param resolvable the MessageSourceResolvable
|
||||
* @param htmlEscape HTML escape the message?
|
||||
* @param htmlEscape if the message should be HTML-escaped
|
||||
* @return the message
|
||||
* @throws org.springframework.context.NoSuchMessageException if not found
|
||||
*/
|
||||
@@ -731,7 +731,7 @@ public class RequestContext {
|
||||
* <p>Note that theme messages are never HTML-escaped, as they typically denote
|
||||
* theme-specific resource paths and not client-visible messages.
|
||||
* @param code code of the message
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param defaultMessage the String to return if the lookup fails
|
||||
* @return the message
|
||||
*/
|
||||
public String getThemeMessage(String code, String defaultMessage) {
|
||||
@@ -745,7 +745,7 @@ public class RequestContext {
|
||||
* theme-specific resource paths and not client-visible messages.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message, or {@code null} if none
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param defaultMessage the String to return if the lookup fails
|
||||
* @return the message
|
||||
*/
|
||||
public String getThemeMessage(String code, @Nullable Object[] args, String defaultMessage) {
|
||||
@@ -759,7 +759,7 @@ public class RequestContext {
|
||||
* theme-specific resource paths and not client-visible messages.
|
||||
* @param code code of the message
|
||||
* @param args arguments for the message as a List, or {@code null} if none
|
||||
* @param defaultMessage String to return if the lookup fails
|
||||
* @param defaultMessage the String to return if the lookup fails
|
||||
* @return the message
|
||||
*/
|
||||
public String getThemeMessage(String code, @Nullable List<?> args, String defaultMessage) {
|
||||
|
||||
@@ -65,13 +65,13 @@ import org.springframework.web.context.support.WebApplicationObjectSupport;
|
||||
*/
|
||||
public abstract class WebContentGenerator extends WebApplicationObjectSupport {
|
||||
|
||||
/** HTTP method "GET" */
|
||||
/** HTTP method "GET". */
|
||||
public static final String METHOD_GET = "GET";
|
||||
|
||||
/** HTTP method "HEAD" */
|
||||
/** HTTP method "HEAD". */
|
||||
public static final String METHOD_HEAD = "HEAD";
|
||||
|
||||
/** HTTP method "POST" */
|
||||
/** HTTP method "POST". */
|
||||
public static final String METHOD_POST = "POST";
|
||||
|
||||
private static final String HEADER_PRAGMA = "Pragma";
|
||||
@@ -81,7 +81,7 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
|
||||
protected static final String HEADER_CACHE_CONTROL = "Cache-Control";
|
||||
|
||||
|
||||
/** Set of supported HTTP methods */
|
||||
/** Set of supported HTTP methods. */
|
||||
@Nullable
|
||||
private Set<String> supportedMethods;
|
||||
|
||||
@@ -469,6 +469,8 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
|
||||
|
||||
|
||||
/**
|
||||
* Check and prepare the given request and response according to the settings
|
||||
* of this generator.
|
||||
* @see #checkRequest(HttpServletRequest)
|
||||
* @see #prepareResponse(HttpServletResponse)
|
||||
* @deprecated as of 4.2, since the {@code lastModified} flag is effectively ignored,
|
||||
@@ -483,6 +485,8 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check and prepare the given request and response according to the settings
|
||||
* of this generator.
|
||||
* @see #checkRequest(HttpServletRequest)
|
||||
* @see #applyCacheSeconds(HttpServletResponse, int)
|
||||
* @deprecated as of 4.2, since the {@code lastModified} flag is effectively ignored,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,18 +31,18 @@ import org.springframework.lang.Nullable;
|
||||
* <caption>Attribute Summary</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th class="colFirst">Attribute</th>
|
||||
* <th class="colOne">Required?</th>
|
||||
* <th class="colOne">Runtime Expression?</th>
|
||||
* <th class="colLast">Description</th>
|
||||
* <th>Attribute</th>
|
||||
* <th>Required?</th>
|
||||
* <th>Runtime Expression?</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr class="altColor">
|
||||
* <td>value</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <td>The value of the argument.</p></td>
|
||||
* <tr>
|
||||
* <td>value</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The value of the argument.</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
@@ -63,7 +63,7 @@ public class ArgumentTag extends BodyTagSupport {
|
||||
|
||||
/**
|
||||
* Set the value of the argument (optional).
|
||||
* <pIf not set, the tag's body content will get evaluated.
|
||||
* If not set, the tag's body content will get evaluated.
|
||||
* @param value the parameter value
|
||||
*/
|
||||
public void setValue(Object value) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,27 +33,27 @@ import org.springframework.validation.Errors;
|
||||
* <caption>Attribute Summary</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th class="colFirst">Attribute</th>
|
||||
* <th class="colOne">Required?</th>
|
||||
* <th class="colOne">Runtime Expression?</th>
|
||||
* <th class="colLast">Description</th>
|
||||
* <th>Attribute</th>
|
||||
* <th>Required?</th>
|
||||
* <th>Runtime Expression?</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr class="altColor">
|
||||
* <td>htmlEscape</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>htmlEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set HTML escaping for this tag, as boolean value.
|
||||
* Overrides the default HTML escaping setting for the current page.</p></td>
|
||||
* Overrides the default HTML escaping setting for the current page.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>name</p></td>
|
||||
* <td>true</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>name</td>
|
||||
* <td>true</td>
|
||||
* <td>true</td>
|
||||
* <td>The name of the bean in the request that needs to be inspected for errors.
|
||||
* If errors are available for this bean, they will be bound under the
|
||||
* 'errors' key.</p></td>
|
||||
* 'errors' key.</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
@@ -66,6 +66,9 @@ import org.springframework.validation.Errors;
|
||||
@SuppressWarnings("serial")
|
||||
public class BindErrorsTag extends HtmlEscapingAwareTag {
|
||||
|
||||
/**
|
||||
* Page context attribute containing {@link Errors}.
|
||||
*/
|
||||
public static final String ERRORS_VARIABLE_NAME = "errors";
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,25 +41,26 @@ import org.springframework.web.util.JavaScriptUtils;
|
||||
* <caption>Attribute Summary</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th class="colFirst">Attribute</th>
|
||||
* <th class="colOne">Required?</th>
|
||||
* <th class="colOne">Runtime Expression?</th>
|
||||
* <th class="colLast">Description</th>
|
||||
* <th>Attribute</th>
|
||||
* <th>Required?</th>
|
||||
* <th>Runtime Expression?</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr class="altColor">
|
||||
* <td>htmlEscape</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>htmlEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set HTML escaping for this tag, as boolean value.
|
||||
* Overrides the default HTML escaping setting for the current page.</p></td>
|
||||
* Overrides the default HTML escaping setting for the current page.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>javaScriptEscape</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>javaScriptEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set JavaScript escaping for this tag, as boolean value.
|
||||
* Default is false.</p></td>
|
||||
* Default is false.</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -47,51 +47,52 @@ import org.springframework.web.util.TagUtils;
|
||||
* <caption>Attribute Summary</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th class="colFirst">Attribute</th>
|
||||
* <th class="colOne">Required?</th>
|
||||
* <th class="colOne">Runtime Expression?</th>
|
||||
* <th class="colLast">Description</th>
|
||||
* <th>Attribute</th>
|
||||
* <th>Required?</th>
|
||||
* <th>Runtime Expression?</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr class="altColor">
|
||||
* <td>expression</p></td>
|
||||
* <td>true</p></td>
|
||||
* <td>true</p></td>
|
||||
* <td>The expression to evaluate.</p></td>
|
||||
* <tr>
|
||||
* <td>expression</td>
|
||||
* <td>true</td>
|
||||
* <td>true</td>
|
||||
* <td>The expression to evaluate.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>htmlEscape</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>htmlEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set HTML escaping for this tag, as a boolean value.
|
||||
* Overrides the default HTML escaping setting for the current page.</p></td>
|
||||
* Overrides the default HTML escaping setting for the current page.</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>javaScriptEscape</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>javaScriptEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set JavaScript escaping for this tag, as a boolean value.
|
||||
* Default is false.</p></td>
|
||||
* Default is false.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>scope</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>scope</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The scope for the var. 'application', 'session', 'request' and 'page'
|
||||
* scopes are supported. Defaults to page scope. This attribute has no effect
|
||||
* unless the var attribute is also defined.</p></td>
|
||||
* unless the var attribute is also defined.</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>var</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>var</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The name of the variable to export the evaluation result to.
|
||||
* If not specified the evaluation result is converted to a String and written
|
||||
* as output.</p></td>
|
||||
* as output.</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.0.1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,19 +30,19 @@ import javax.servlet.jsp.JspException;
|
||||
* <caption>Attribute Summary</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th class="colFirst">Attribute</th>
|
||||
* <th class="colOne">Required?</th>
|
||||
* <th class="colOne">Runtime Expression?</th>
|
||||
* <th class="colLast">Description</th>
|
||||
* <th>Attribute</th>
|
||||
* <th>Required?</th>
|
||||
* <th>Runtime Expression?</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr class="altColor">
|
||||
* <td>defaultHtmlEscape</p></td>
|
||||
* <td>true</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>defaultHtmlEscape</td>
|
||||
* <td>true</td>
|
||||
* <td>true</td>
|
||||
* <td>Set the default value for HTML escaping, to be put into the current
|
||||
* PageContext.</p></td>
|
||||
* PageContext.</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -51,87 +51,87 @@ import org.springframework.web.util.TagUtils;
|
||||
* <caption>Attribute Summary</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th class="colFirst">Attribute</th>
|
||||
* <th class="colOne">Required?</th>
|
||||
* <th class="colOne">Runtime Expression?</th>
|
||||
* <th class="colLast">Description</th>
|
||||
* <th>Attribute</th>
|
||||
* <th>Required?</th>
|
||||
* <th>Runtime Expression?</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr class="altColor">
|
||||
* <td>arguments</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>arguments</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set optional message arguments for this tag, as a (comma-)delimited
|
||||
* String (each String argument can contain JSP EL), an Object array (used as
|
||||
* argument array), or a single Object (used as single argument).</p></td>
|
||||
* argument array), or a single Object (used as single argument).</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>argumentSeparator</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>argumentSeparator</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The separator character to be used for splitting the arguments string
|
||||
* value; defaults to a 'comma' (',').</p></td>
|
||||
* value; defaults to a 'comma' (',').</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>code</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>code</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The code (key) to use when looking up the message.
|
||||
* If code is not provided, the text attribute will be used.</p></td>
|
||||
* If code is not provided, the text attribute will be used.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>htmlEscape</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>htmlEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set HTML escaping for this tag, as boolean value.
|
||||
* Overrides the default HTML escaping setting for the current page.</p></td>
|
||||
* Overrides the default HTML escaping setting for the current page.</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>javaScriptEscape</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>javaScriptEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set JavaScript escaping for this tag, as boolean value.
|
||||
* Default is false.</p></td>
|
||||
* Default is false.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>message</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>message</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>A MessageSourceResolvable argument (direct or through JSP EL).
|
||||
* Fits nicely when used in conjunction with Spring’s own validation error
|
||||
* classes which all implement the MessageSourceResolvable interface.
|
||||
* For example, this allows you to iterate over all of the errors in a form,
|
||||
* passing each error (using a runtime expression) as the value of this
|
||||
* 'message' attribute, thus effecting the easy display of such error
|
||||
* messages.</p></td>
|
||||
* messages.</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>scope</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>scope</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The scope to use when exporting the result to a variable. This attribute
|
||||
* is only used when var is also set. Possible values are page, request, session
|
||||
* and application.</p></td>
|
||||
* and application.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>text</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>text</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Default text to output when a message for the given code could not be
|
||||
* found. If both text and code are not set, the tag will output null.</p></td>
|
||||
* found. If both text and code are not set, the tag will output null.</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>var</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>var</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The string to use when binding the result to the page, request, session
|
||||
* or application scope. If not specified, the result gets outputted to the writer
|
||||
* (i.e. typically directly to the JSP).</p></td>
|
||||
* (i.e. typically directly to the JSP).</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
* @author Nicholas Williams
|
||||
@@ -147,7 +147,7 @@ import org.springframework.web.util.TagUtils;
|
||||
public class MessageTag extends HtmlEscapingAwareTag implements ArgumentAware {
|
||||
|
||||
/**
|
||||
* Default separator for splitting an arguments String: a comma (",")
|
||||
* Default separator for splitting an arguments String: a comma (",").
|
||||
*/
|
||||
public static final String DEFAULT_ARGUMENT_SEPARATOR = ",";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,19 +39,19 @@ import org.springframework.lang.Nullable;
|
||||
* <caption>Attribute Summary</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th class="colFirst">Attribute</th>
|
||||
* <th class="colOne">Required?</th>
|
||||
* <th class="colOne">Runtime Expression?</th>
|
||||
* <th class="colLast">Description</th>
|
||||
* <th>Attribute</th>
|
||||
* <th>Required?</th>
|
||||
* <th>Runtime Expression?</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr class="altColor">
|
||||
* <td>path</p></td>
|
||||
* <td>true</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>path</td>
|
||||
* <td>true</td>
|
||||
* <td>true</td>
|
||||
* <td>Set the path that this tag should apply. E.g. 'customer' to allow bind
|
||||
* paths like 'address.street' rather than 'customer.address.street'.</p></td>
|
||||
* paths like 'address.street' rather than 'customer.address.street'.</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
@@ -71,7 +71,7 @@ public class NestedPathTag extends TagSupport implements TryCatchFinally {
|
||||
@Nullable
|
||||
private String path;
|
||||
|
||||
/** Caching a previous nested path, so that it may be reset */
|
||||
/** Caching a previous nested path, so that it may be reset. */
|
||||
@Nullable
|
||||
private String previousNestedPath;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,28 +31,28 @@ import org.springframework.lang.Nullable;
|
||||
* <caption>Attribute Summary</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th class="colFirst">Attribute</th>
|
||||
* <th class="colOne">Required?</th>
|
||||
* <th class="colOne">Runtime Expression?</th>
|
||||
* <th class="colLast">Description</th>
|
||||
* <th>Attribute</th>
|
||||
* <th>Required?</th>
|
||||
* <th>Runtime Expression?</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr class="altColor">
|
||||
* <td>name</p></td>
|
||||
* <td>true</p></td>
|
||||
* <td>true</p></td>
|
||||
* <td>The name of the parameter.</p></td>
|
||||
* <tr>
|
||||
* <td>name</td>
|
||||
* <td>true</td>
|
||||
* <td>true</td>
|
||||
* <td>The name of the parameter.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>value</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <td>The value of the parameter.</p></td>
|
||||
* <tr>
|
||||
* <td>value</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The value of the parameter.</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
*
|
||||
* @author Scott Andrews
|
||||
* @author Nicholas Williams
|
||||
* @since 3.0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,7 +58,7 @@ public abstract class RequestContextAwareTag extends TagSupport implements TryCa
|
||||
"org.springframework.web.servlet.tags.REQUEST_CONTEXT";
|
||||
|
||||
|
||||
/** Logger available to subclasses */
|
||||
/** Logger available to subclasses. */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,81 +37,81 @@ import org.springframework.context.NoSuchMessageException;
|
||||
* <caption>Attribute Summary</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th class="colFirst">Attribute</th>
|
||||
* <th class="colOne">Required?</th>
|
||||
* <th class="colOne">Runtime Expression?</th>
|
||||
* <th class="colLast">Description</th>
|
||||
* <th>Attribute</th>
|
||||
* <th>Required?</th>
|
||||
* <th>Runtime Expression?</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr class="altColor">
|
||||
* <td>arguments</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>arguments</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set optional message arguments for this tag, as a (comma-)delimited
|
||||
* String (each String argument can contain JSP EL), an Object array (used as
|
||||
* argument array), or a single Object (used as single argument).</p></td>
|
||||
* argument array), or a single Object (used as single argument).</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>argumentSeparator</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>argumentSeparator</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The separator character to be used for splitting the arguments string
|
||||
* value; defaults to a 'comma' (',').</p></td>
|
||||
* value; defaults to a 'comma' (',').</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>code</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>code</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The code (key) to use when looking up the message. If code is not
|
||||
* provided, the text attribute will be used.</p></td>
|
||||
* provided, the text attribute will be used.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>htmlEscape</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>htmlEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set HTML escaping for this tag, as boolean value. Overrides the default
|
||||
* HTML escaping setting for the current page.</p></td>
|
||||
* HTML escaping setting for the current page.</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>javaScriptEscape</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>javaScriptEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set JavaScript escaping for this tag, as boolean value.
|
||||
* Default is false.</p></td>
|
||||
* Default is false.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>message</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <td>A MessageSourceResolvable argument (direct or through JSP EL).</p></td>
|
||||
* <tr>
|
||||
* <td>message</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>A MessageSourceResolvable argument (direct or through JSP EL).</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>scope</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>scope</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The scope to use when exporting the result to a variable. This attribute
|
||||
* is only used when var is also set. Possible values are page, request, session
|
||||
* and application.</p></td>
|
||||
* and application.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>text</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>text</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Default text to output when a message for the given code could not be
|
||||
* found. If both text and code are not set, the tag will output null.</p></td>
|
||||
* found. If both text and code are not set, the tag will output null.</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>var</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>var</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The string to use when binding the result to the page, request, session
|
||||
* or application scope. If not specified, the result gets outputted to the
|
||||
* writer (i.e. typically directly to the JSP).</p></td>
|
||||
* writer (i.e. typically directly to the JSP).</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
*
|
||||
*
|
||||
* @author Jean-Pierre Pawlak
|
||||
* @author Juergen Hoeller
|
||||
* @see org.springframework.ui.context.Theme
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,43 +37,43 @@ import org.springframework.web.util.TagUtils;
|
||||
* <caption>Attribute Summary</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th class="colFirst">Attribute</th>
|
||||
* <th class="colOne">Required?</th>
|
||||
* <th class="colOne">Runtime Expression?</th>
|
||||
* <th class="colLast">Description</th>
|
||||
* <th>Attribute</th>
|
||||
* <th>Required?</th>
|
||||
* <th>Runtime Expression?</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr class="altColor">
|
||||
* <td>htmlEscape</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>htmlEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set HTML escaping for this tag, as boolean value. Overrides the default HTML
|
||||
* escaping setting for the current page.</p></td>
|
||||
* escaping setting for the current page.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>scope</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>scope</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The scope to use when exported the result to a variable. This attribute
|
||||
* is only used when var is also set. Possible values are page, request, session
|
||||
* and application.</p></td>
|
||||
* and application.</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>value</p></td>
|
||||
* <td>true</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>value</td>
|
||||
* <td>true</td>
|
||||
* <td>true</td>
|
||||
* <td>The value to transform. This is the actual object you want to have
|
||||
* transformed (for instance a Date). Using the PropertyEditor that is currently
|
||||
* in use by the 'spring:bind' tag.</p></td>
|
||||
* in use by the 'spring:bind' tag.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>var</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>var</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The string to use when binding the result to the page, request, session
|
||||
* or application scope. If not specified, the result gets outputted to the
|
||||
* writer (i.e. typically directly to the JSP).</p></td>
|
||||
* writer (i.e. typically directly to the JSP).</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
@@ -86,15 +86,15 @@ import org.springframework.web.util.TagUtils;
|
||||
@SuppressWarnings("serial")
|
||||
public class TransformTag extends HtmlEscapingAwareTag {
|
||||
|
||||
/** the value to transform using the appropriate property editor */
|
||||
/** the value to transform using the appropriate property editor. */
|
||||
@Nullable
|
||||
private Object value;
|
||||
|
||||
/** the variable to put the result in */
|
||||
/** the variable to put the result in. */
|
||||
@Nullable
|
||||
private String var;
|
||||
|
||||
/** the scope of the variable the result will be put in */
|
||||
/** the scope of the variable the result will be put in. */
|
||||
private String scope = TagUtils.SCOPE_PAGE;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -76,56 +76,56 @@ import org.springframework.web.util.UriUtils;
|
||||
* <caption>Attribute Summary</caption>
|
||||
* <thead>
|
||||
* <tr>
|
||||
* <th class="colFirst">Attribute</th>
|
||||
* <th class="colOne">Required?</th>
|
||||
* <th class="colOne">Runtime Expression?</th>
|
||||
* <th class="colLast">Description</th>
|
||||
* <th>Attribute</th>
|
||||
* <th>Required?</th>
|
||||
* <th>Runtime Expression?</th>
|
||||
* <th>Description</th>
|
||||
* </tr>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr class="altColor">
|
||||
* <td>value</p></td>
|
||||
* <td>true</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>value</td>
|
||||
* <td>true</td>
|
||||
* <td>true</td>
|
||||
* <td>The URL to build. This value can include template {placeholders} that are
|
||||
* replaced with the URL encoded value of the named parameter. Parameters
|
||||
* must be defined using the param tag inside the body of this tag.</p></td>
|
||||
* must be defined using the param tag inside the body of this tag.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>context</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>context</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Specifies a remote application context path.
|
||||
* The default is the current application context path.</p></td>
|
||||
* The default is the current application context path.</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>var</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>var</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The name of the variable to export the URL value to.
|
||||
* If not specified the URL is written as output.</p></td>
|
||||
* If not specified the URL is written as output.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>scope</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>scope</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>The scope for the var. 'application', 'session', 'request' and 'page'
|
||||
* scopes are supported. Defaults to page scope. This attribute has no
|
||||
* effect unless the var attribute is also defined.</p></td>
|
||||
* effect unless the var attribute is also defined.</td>
|
||||
* </tr>
|
||||
* <tr class="altColor">
|
||||
* <td>htmlEscape</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>htmlEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set HTML escaping for this tag, as a boolean value. Overrides the
|
||||
* default HTML escaping setting for the current page.</p></td>
|
||||
* default HTML escaping setting for the current page.</td>
|
||||
* </tr>
|
||||
* <tr class="rowColor">
|
||||
* <td>javaScriptEscape</p></td>
|
||||
* <td>false</p></td>
|
||||
* <td>true</p></td>
|
||||
* <tr>
|
||||
* <td>javaScriptEscape</td>
|
||||
* <td>false</td>
|
||||
* <td>true</td>
|
||||
* <td>Set JavaScript escaping for this tag, as a boolean value.
|
||||
* Default is false.</p></td>
|
||||
* Default is false.</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
@@ -166,7 +166,7 @@ public class UrlTag extends HtmlEscapingAwareTag implements ParamAware {
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value of the URL
|
||||
* Sets the value of the URL.
|
||||
*/
|
||||
public void setValue(String value) {
|
||||
if (value.contains(URL_TYPE_ABSOLUTE)) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -57,7 +57,7 @@ public abstract class AbstractHtmlElementBodyTag extends AbstractHtmlElementTag
|
||||
* If {@link #shouldRender rendering}, flush any buffered
|
||||
* {@link BodyContent} or, if no {@link BodyContent} is supplied,
|
||||
* {@link #renderDefaultContent render the default content}.
|
||||
* @return Tag#EVAL_PAGE
|
||||
* @return a {@link Tag#EVAL_PAGE} result
|
||||
*/
|
||||
@Override
|
||||
public int doEndTag() throws JspException {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -156,7 +156,7 @@ public class ButtonTag extends AbstractHtmlElementTag {
|
||||
|
||||
/**
|
||||
* Return the default value.
|
||||
* @return The default value if none supplied.
|
||||
* @return the default value if none supplied
|
||||
*/
|
||||
protected String getDefaultValue() {
|
||||
return "Submit";
|
||||
|
||||
@@ -242,13 +242,13 @@ import org.springframework.web.util.UriUtils;
|
||||
@SuppressWarnings("serial")
|
||||
public class FormTag extends AbstractHtmlElementTag {
|
||||
|
||||
/** The default HTTP method using which form values are sent to the server: "post" */
|
||||
/** The default HTTP method using which form values are sent to the server: "post". */
|
||||
private static final String DEFAULT_METHOD = "post";
|
||||
|
||||
/** The default attribute name: "command" */
|
||||
/** The default attribute name: "command". */
|
||||
public static final String DEFAULT_COMMAND_NAME = "command";
|
||||
|
||||
/** The name of the '{@code modelAttribute}' setting */
|
||||
/** The name of the '{@code modelAttribute}' setting. */
|
||||
private static final String MODEL_ATTRIBUTE = "modelAttribute";
|
||||
|
||||
/**
|
||||
@@ -314,7 +314,7 @@ public class FormTag extends AbstractHtmlElementTag {
|
||||
|
||||
private String methodParam = DEFAULT_METHOD_PARAM;
|
||||
|
||||
/** Caching a previous nested path, so that it may be reset */
|
||||
/** Caching a previous nested path, so that it may be reset. */
|
||||
private String previousNestedPath;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,6 +42,9 @@ import org.springframework.web.util.WebUtils;
|
||||
*/
|
||||
public class CookieThemeResolver extends CookieGenerator implements ThemeResolver {
|
||||
|
||||
/**
|
||||
* The default theme name used if no alternative is provided.
|
||||
*/
|
||||
public static final String ORIGINAL_DEFAULT_THEME_NAME = "theme";
|
||||
|
||||
/**
|
||||
@@ -53,6 +56,9 @@ public class CookieThemeResolver extends CookieGenerator implements ThemeResolve
|
||||
*/
|
||||
public static final String THEME_REQUEST_ATTRIBUTE_NAME = CookieThemeResolver.class.getName() + ".THEME";
|
||||
|
||||
/**
|
||||
* The default name of the cookie that holds the theme name.
|
||||
*/
|
||||
public static final String DEFAULT_COOKIE_NAME = CookieThemeResolver.class.getName() + ".THEME";
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,10 +44,10 @@ import org.springframework.web.servlet.ViewResolver;
|
||||
*/
|
||||
public abstract class AbstractCachingViewResolver extends WebApplicationObjectSupport implements ViewResolver {
|
||||
|
||||
/** Default maximum number of entries for the view cache: 1024 */
|
||||
/** Default maximum number of entries for the view cache: 1024. */
|
||||
public static final int DEFAULT_CACHE_LIMIT = 1024;
|
||||
|
||||
/** Dummy marker object for unresolved views in the cache Maps */
|
||||
/** Dummy marker object for unresolved views in the cache Maps. */
|
||||
private static final View UNRESOLVED_VIEW = new View() {
|
||||
@Override
|
||||
@Nullable
|
||||
@@ -60,16 +60,16 @@ public abstract class AbstractCachingViewResolver extends WebApplicationObjectSu
|
||||
};
|
||||
|
||||
|
||||
/** The maximum number of entries in the cache */
|
||||
/** The maximum number of entries in the cache. */
|
||||
private volatile int cacheLimit = DEFAULT_CACHE_LIMIT;
|
||||
|
||||
/** Whether we should refrain from resolving views again if unresolved once */
|
||||
/** Whether we should refrain from resolving views again if unresolved once. */
|
||||
private boolean cacheUnresolved = true;
|
||||
|
||||
/** Fast access cache for Views, returning already cached instances without a global lock */
|
||||
/** Fast access cache for Views, returning already cached instances without a global lock. */
|
||||
private final Map<Object, View> viewAccessCache = new ConcurrentHashMap<>(DEFAULT_CACHE_LIMIT);
|
||||
|
||||
/** Map from view key to View instance, synchronized for View creation */
|
||||
/** Map from view key to View instance, synchronized for View creation. */
|
||||
@SuppressWarnings("serial")
|
||||
private final Map<Object, View> viewCreationCache =
|
||||
new LinkedHashMap<Object, View>(DEFAULT_CACHE_LIMIT, 0.75f, true) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -65,7 +65,7 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement
|
||||
/** Default content type. Overridable as bean property. */
|
||||
public static final String DEFAULT_CONTENT_TYPE = "text/html;charset=ISO-8859-1";
|
||||
|
||||
/** Initial size for the temporary output byte array (if any) */
|
||||
/** Initial size for the temporary output byte array (if any). */
|
||||
private static final int OUTPUT_BYTE_ARRAY_INITIAL_SIZE = 4096;
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement
|
||||
* the View instance configuration. "Dynamic" attributes, on the other hand,
|
||||
* are values passed in as part of the model.
|
||||
* <p>Can be populated with a "map" or "props" element in XML bean definitions.
|
||||
* @param attributes Map with name Strings as keys and attribute objects as values
|
||||
* @param attributes a Map with name Strings as keys and attribute objects as values
|
||||
*/
|
||||
public void setAttributesMap(@Nullable Map<String, ?> attributes) {
|
||||
if (attributes != null) {
|
||||
@@ -433,7 +433,7 @@ public abstract class AbstractView extends WebApplicationObjectSupport implement
|
||||
* Expose the model objects in the given map as request attributes.
|
||||
* Names will be taken from the model Map.
|
||||
* This method is suitable for all resources reachable by {@link javax.servlet.RequestDispatcher}.
|
||||
* @param model Map of model objects to expose
|
||||
* @param model a Map of model objects to expose
|
||||
* @param request current HTTP request
|
||||
*/
|
||||
protected void exposeModelAsRequestAttributes(Map<String, Object> model,
|
||||
|
||||
@@ -55,7 +55,7 @@ import org.springframework.web.servlet.ViewResolver;
|
||||
* or {@code Accept} header.
|
||||
*
|
||||
* <p>The {@code ContentNegotiatingViewResolver} does not resolve views itself, but delegates to
|
||||
* other {@link ViewResolver}s. By default, these other view resolvers are picked up automatically
|
||||
* other {@link ViewResolver ViewResolvers}. By default, these other view resolvers are picked up automatically
|
||||
* from the application context, though they can also be set explicitly by using the
|
||||
* {@link #setViewResolvers viewResolvers} property. <strong>Note</strong> that in order for this
|
||||
* view resolver to work properly, the {@link #setOrder order} property needs to be set to a higher
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -368,7 +368,7 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView {
|
||||
* attributes or URI variables from the current request. Model attributes
|
||||
* referenced in the URL are removed from the model.
|
||||
* @param targetUrl the redirect URL
|
||||
* @param model Map that contains model attributes
|
||||
* @param model a Map that contains model attributes
|
||||
* @param currentUriVariables current request URI variables to use
|
||||
* @param encodingScheme the encoding scheme to use
|
||||
* @throws UnsupportedEncodingException if string encoding failed
|
||||
@@ -435,7 +435,7 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView {
|
||||
* Append query properties to the redirect URL.
|
||||
* Stringifies, URL-encodes and formats model attributes as query properties.
|
||||
* @param targetUrl the StringBuilder to append the properties to
|
||||
* @param model Map that contains model attributes
|
||||
* @param model a Map that contains model attributes
|
||||
* @param encodingScheme the encoding scheme to use
|
||||
* @throws UnsupportedEncodingException if string encoding failed
|
||||
* @see #queryProperties
|
||||
@@ -602,7 +602,7 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView {
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a redirect back to the HTTP client
|
||||
* Send a redirect back to the HTTP client.
|
||||
* @param request current HTTP request (allows for reacting to request method)
|
||||
* @param response current HTTP response (for sending response headers)
|
||||
* @param targetUrl the target URL to redirect to
|
||||
|
||||
@@ -63,7 +63,7 @@ import org.springframework.web.servlet.View;
|
||||
public class ResourceBundleViewResolver extends AbstractCachingViewResolver
|
||||
implements Ordered, InitializingBean, DisposableBean {
|
||||
|
||||
/** The default basename if no other basename is supplied */
|
||||
/** The default basename if no other basename is supplied. */
|
||||
public static final String DEFAULT_BASENAME = "views";
|
||||
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
|
||||
@Nullable
|
||||
private String requestContextAttribute;
|
||||
|
||||
/** Map of static attributes, keyed by attribute name (String) */
|
||||
/** Map of static attributes, keyed by attribute name (String). */
|
||||
private final Map<String, Object> staticAttributes = new HashMap<>();
|
||||
|
||||
@Nullable
|
||||
@@ -325,7 +325,7 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
|
||||
* Set static attributes from a Map, for all views returned by this resolver.
|
||||
* This allows to set any kind of attribute values, for example bean references.
|
||||
* <p>Can be populated with a "map" or "props" element in XML bean definitions.
|
||||
* @param attributes Map with name Strings as keys and attribute objects as values
|
||||
* @param attributes a Map with name Strings as keys and attribute objects as values
|
||||
* @see AbstractView#setAttributesMap
|
||||
*/
|
||||
public void setAttributesMap(@Nullable Map<String, ?> attributes) {
|
||||
@@ -354,7 +354,7 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
|
||||
* <li>{@code true} - all Views resolved by this resolver will expose path variables
|
||||
* <li>{@code false} - no Views resolved by this resolver will expose path variables
|
||||
* <li>{@code null} - individual Views can decide for themselves (this is used by the default)
|
||||
* <ul>
|
||||
* </ul>
|
||||
* @see AbstractView#setExposePathVariables
|
||||
*/
|
||||
public void setExposePathVariables(@Nullable Boolean exposePathVariables) {
|
||||
@@ -505,7 +505,7 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
|
||||
|
||||
/**
|
||||
* Delegates to {@code buildView} for creating a new instance of the
|
||||
* specified view class, and applies the following Spring lifecycle methods
|
||||
* specified view class. Applies the following Spring lifecycle methods
|
||||
* (as supported by the generic Spring bean factory):
|
||||
* <ul>
|
||||
* <li>ApplicationContextAware's {@code setApplicationContext}
|
||||
|
||||
@@ -58,7 +58,7 @@ import org.springframework.web.servlet.View;
|
||||
public class XmlViewResolver extends AbstractCachingViewResolver
|
||||
implements Ordered, InitializingBean, DisposableBean {
|
||||
|
||||
/** Default if no other location is supplied */
|
||||
/** Default if no other location is supplied. */
|
||||
public static final String DEFAULT_LOCATION = "/WEB-INF/views.xml";
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,6 +46,9 @@ import com.rometools.rome.feed.atom.Feed;
|
||||
*/
|
||||
public abstract class AbstractAtomFeedView extends AbstractFeedView<Feed> {
|
||||
|
||||
/**
|
||||
* The default feed type used.
|
||||
*/
|
||||
public static final String DEFAULT_FEED_TYPE = "atom_1.0";
|
||||
|
||||
private String feedType = DEFAULT_FEED_TYPE;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -43,6 +43,7 @@ import org.springframework.web.servlet.view.AbstractView;
|
||||
* @author Arjen Poutsma
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.0
|
||||
* @param <T> the {@link WireFeed} type
|
||||
* @see AbstractRssFeedView
|
||||
* @see AbstractAtomFeedView
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -258,7 +258,7 @@ public class FreeMarkerView extends AbstractTemplateView {
|
||||
* different rendering operations can't overwrite each other's formats etc.
|
||||
* <p>Called by {@code renderMergedTemplateModel}. The default implementation
|
||||
* is empty. This method can be overridden to add custom helpers to the model.
|
||||
* @param model The model that will be passed to the template at merge time
|
||||
* @param model the model that will be passed to the template at merge time
|
||||
* @param request current HTTP request
|
||||
* @throws Exception if there's a fatal error while we're adding information to the context
|
||||
* @see #renderMergedTemplateModel
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -138,7 +138,7 @@ public class ScriptTemplateConfigurer implements ScriptTemplateConfig {
|
||||
* {@link #setEngineName(String)}. Using {@link #setEngine(ScriptEngine)} is not
|
||||
* possible because multiple instances of the script engine need to be created lazily
|
||||
* (one per thread).
|
||||
* @see <a href="http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngineFactory.html#getParameter-java.lang.String-">THREADING ScriptEngine parameter<a/>
|
||||
* @see <a href="http://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngineFactory.html#getParameter-java.lang.String-">THREADING ScriptEngine parameter</a>
|
||||
*/
|
||||
public void setSharedEngine(@Nullable Boolean sharedEngine) {
|
||||
this.sharedEngine = sharedEngine;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -71,6 +71,9 @@ import org.springframework.web.servlet.view.AbstractUrlBasedView;
|
||||
*/
|
||||
public class ScriptTemplateView extends AbstractUrlBasedView {
|
||||
|
||||
/**
|
||||
* The default content type for the view.
|
||||
*/
|
||||
public static final String DEFAULT_CONTENT_TYPE = "text/html";
|
||||
|
||||
private static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,7 +39,7 @@ import org.springframework.web.context.WebApplicationContext;
|
||||
*/
|
||||
public class SimpleSpringPreparerFactory extends AbstractSpringPreparerFactory {
|
||||
|
||||
/** Cache of shared ViewPreparer instances: bean name -> bean instance */
|
||||
/** Cache of shared ViewPreparer instances: bean name -> bean instance. */
|
||||
private final Map<String, ViewPreparer> sharedPreparers = new ConcurrentHashMap<>(16);
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -45,6 +45,9 @@ import org.springframework.web.servlet.view.json.AbstractJackson2View;
|
||||
*/
|
||||
public class MappingJackson2XmlView extends AbstractJackson2View {
|
||||
|
||||
/**
|
||||
* The default content type for the view.
|
||||
*/
|
||||
public static final String DEFAULT_CONTENT_TYPE = "application/xml";
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user