Class SpaBundle.Builder

java.lang.Object
ru.vyarus.guicey.spa.SpaBundle.Builder
Enclosing class:
SpaBundle

public static class SpaBundle.Builder extends Object
Spa bundle builder.
  • Constructor Details

    • Builder

      public Builder(boolean mainContext, String name, String path, String uri)
      Create builder.
      Parameters:
      mainContext - true for main context, false for admin
      name - application name
      path - resources path
      uri - mapping url
  • Method Details

    • indexPage

      public SpaBundle.Builder indexPage(String name)
      Parameters:
      name - index file name (by default "index.html")
      Returns:
      builder instance
    • preventRedirectRegex

      public SpaBundle.Builder preventRedirectRegex(String regex)
      Redirect filter will prevent redirection when accept header is not compatible with text/html. As this may not be enough, default regex SpaBundle.DEFAULT_PATTERN is 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