Package ru.vyarus.guicey.spa
Class SpaBundle.Builder
- java.lang.Object
-
- ru.vyarus.guicey.spa.SpaBundle.Builder
-
- Enclosing class:
- SpaBundle
public static class SpaBundle.Builder extends java.lang.ObjectSpa bundle builder.
-
-
Constructor Summary
Constructors Constructor Description Builder(boolean mainContext, java.lang.String name, java.lang.String path, java.lang.String uri)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpaBundlebuild()SpaBundle.BuilderindexPage(java.lang.String name)SpaBundle.BuilderpreventRedirectRegex(java.lang.String regex)Redirect filter will prevent redirection when accept header is not compatible with text/html.
-
-
-
Method Detail
-
indexPage
public SpaBundle.Builder indexPage(java.lang.String name)
- Parameters:
name- index file name (by default "index.html")- Returns:
- builder instance
-
preventRedirectRegex
public SpaBundle.Builder preventRedirectRegex(java.lang.String regex)
Redirect filter will prevent redirection when accept header is not compatible with text/html. As this may not be enough, default regexSpaBundle.DEFAULT_PATTERNis used to prevent redirection in some cases. By default it's all common web files (html, css, js) with possible version markers (e.g. ?ver=1214324).NOTE: regex is applied with "find", so use ^ or $ to apply boundaries.
- Parameters:
regex- regular expression to prevent redirection to root (prevent when regex matched)- Returns:
- builder instance
-
build
public SpaBundle build()
- Returns:
- configured dropwizard bundle instance
-
-