Interface ReactViewsRendererConfiguration


@ConfigurationProperties("micronaut.views.react") public interface ReactViewsRendererConfiguration
An interface to the configuration properties for React server-side rendering.
  • Field Details

  • Method Details

    • getClientBundleURL

      @NotBlank @NonNull @Bindable(defaultValue="/static/client.js") @NotBlank @NonNull String getClientBundleURL()
      Returns:
      the URL (relative or absolute) where the client Javascript bundle can be found. It will be appended to the generated HTML in a <script> tag. Defaults to "/static/client.js"
    • getServerBundlePath

      @NotBlank @NonNull @Bindable(defaultValue="classpath:views/ssr-components.mjs") @NotBlank @NonNull String getServerBundlePath()
      Returns:
      the path relative to micronaut.views.folder where the bundle used for server-side rendering can be found. Defaults to "classpath:views/ssr-components.mjs"
    • getRenderScript

      @NotBlank @NonNull @Bindable(defaultValue="classpath:/io/micronaut/views/react/react.js") @NotBlank @NonNull String getRenderScript()
      Returns:
      Either a file path (starting with "file:" or a resource in the classpath (starting with "classpath:") to a render script. Please see the user guide for more information on what this Javascript file should contain.
    • getSandbox

      @Bindable(defaultValue="false") boolean getSandbox()
      Returns:
      If true, GraalJS sandboxing is enabled. This helps protect you against supply chain attacks that might inject code into your server via hijacked React components. It requires a sufficiently new version of GraalJS. Defaults to OFF.