master
Juergen Hoeller 7 years ago
parent c29b6f5b55
commit c3cf0840b7
  1. 15
      spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewMethodReturnValueHandler.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2016 the original author or authors. * Copyright 2002-2017 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -49,12 +49,10 @@ public class ModelAndViewMethodReturnValueHandler implements HandlerMethodReturn
/** /**
* Configure one more simple patterns (as described in * Configure one more simple patterns (as described in {@link PatternMatchUtils#simpleMatch})
* {@link org.springframework.util.PatternMatchUtils#simpleMatch}) to use in order to recognize * to use in order to recognize custom redirect prefixes in addition to "redirect:".
* custom redirect prefixes in addition to "redirect:". * <p>Note that simply configuring this property will not make a custom redirect prefix work.
* <p>Note that simply configuring this property will not make a custom * There must be a custom {@link View} that recognizes the prefix as well.
* redirect prefix work. There must be a custom View that recognizes the
* prefix as well.
* @since 4.1 * @since 4.1
*/ */
public void setRedirectPatterns(@Nullable String... redirectPatterns) { public void setRedirectPatterns(@Nullable String... redirectPatterns) {
@ -62,7 +60,8 @@ public class ModelAndViewMethodReturnValueHandler implements HandlerMethodReturn
} }
/** /**
* The configured redirect patterns, if any. * Return the configured redirect patterns, if any.
* @since 4.1
*/ */
@Nullable @Nullable
public String[] getRedirectPatterns() { public String[] getRedirectPatterns() {

Loading…
Cancel
Save