@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License .
* /
package org.springframework.web.reactive.view ;
package org.springframework.web.reactive.result. view ;
import java.util.Locale ;
@ -22,19 +22,17 @@ import reactor.core.publisher.Mono;
import org.springframework.beans.BeanUtils ;
import org.springframework.beans.factory.InitializingBean ;
import org.springframework.util.PatternMatchUtils ;
import org.springframework.web.reactive.View ;
/ * *
* A { @link org . springframework . web . reactive . ViewResolver ViewResolver } that
* allow direct resolution of symbolic view names to URLs without explicit
* mapping definition . This is useful if symbolic names match the names of view
* resources in a straightforward manner ( i . e . the symbolic name is the unique
* part of the resource ' s filename ) , without the need for a dedicated mapping
* to be defined for each view .
* A { @link ViewResolver } that allow direct resolution of symbolic view names
* to URLs without explicit mapping definition . This is useful if symbolic names
* match the names of view resources in a straightforward manner ( i . e . the
* symbolic name is the unique part of the resource ' s filename ) , without the need
* for a dedicated mapping to be defined for each view .
*
* < p > Supports { @link AbstractUrlBasedView } subclasses like
* { @link org . springframework . web . reactive . view . freemarker . FreeMarkerView } .
* { @link org . springframework . web . reactive . result . view . freemarker . FreeMarkerView } .
* The view class for all views generated by this resolver can be specified
* via the "viewClass" property .
*
@ -54,7 +52,7 @@ import org.springframework.web.reactive.View;
* a symbolic view name to different resources depending on the current locale .
* * @author Rossen Stoyanchev
* /
public class UrlBasedViewResolver extends ViewResolverSupport implements InitializingBean {
public class UrlBasedViewResolver extends ViewResolverSupport implements ViewResolver , InitializingBean {
private Class < ? > viewClass ;
@ -125,9 +123,8 @@ public class UrlBasedViewResolver extends ViewResolverSupport implements Initial
/ * *
* Set the view names ( or name patterns ) that can be handled by this
* { @link org . springframework . web . reactive . ViewResolver } . View names can
* contain simple wildcards such that ' my * ' , ' * Report ' and ' * Repo * ' will
* all match the view name ' myReport ' .
* { @link ViewResolver } . View names can contain simple wildcards such that
* ' my * ' , ' * Report ' and ' * Repo * ' will all match the view name ' myReport ' .
* @see # canHandle
* /
public void setViewNames ( String . . . viewNames ) {
@ -136,7 +133,7 @@ public class UrlBasedViewResolver extends ViewResolverSupport implements Initial
/ * *
* Return the view names ( or name patterns ) that can be handled by this
* { @link org . springframework . web . reactive . ViewResolver } .
* { @link ViewResolver } .
* /
protected String [ ] getViewNames ( ) {
return this . viewNames ;
@ -167,8 +164,7 @@ public class UrlBasedViewResolver extends ViewResolverSupport implements Initial
}
/ * *
* Indicates whether or not this
* { @link org . springframework . web . reactive . ViewResolver } can handle the
* Indicates whether or not this { @link ViewResolver } can handle the
* supplied view name . If not , an empty result is returned . The default
* implementation checks against the configured { @link # setViewNames
* view names } .