Interface Deployment


public interface Deployment
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.undertow.servlet.api.DeploymentInfo
     
    default Deployment
    enableWebSockets(UnaryOperator<io.undertow.websockets.jsr.WebSocketDeploymentInfo> webSocketConfiguration)
    Enable WebSocket support.
    static Deployment
    springSelfContained(Class<? extends org.springframework.web.WebApplicationInitializer>... webAppInitializers)
    Deployment configuration for a root web application, with resources fetched from the classpath, and initialized by the given WebApplicationInitializer implementations.
    static Deployment
    springWithExternalWebResources(Path localResources, Class<? extends org.springframework.web.WebApplicationInitializer>... webAppInitializers)
    Deployment configuration for a root web application, with resources fetched from the given path on the local filesystem, and initialized by the given WebApplicationInitializer implementations.
    default Deployment
    Application runs behind a reverse proxy and X-Forwarded-* HTTP headers should be read.
    default Deployment
    Adds overrides to web application properties.
    default Deployment
    withProperties(org.springframework.core.env.EnumerablePropertySource propertySource)
    Adds an additional Spring property source, e.g.
  • Field Details

  • Method Details

    • configuration

      io.undertow.servlet.api.DeploymentInfo configuration()
    • springSelfContained

      static Deployment springSelfContained(Class<? extends org.springframework.web.WebApplicationInitializer>... webAppInitializers)
      Deployment configuration for a root web application, with resources fetched from the classpath, and initialized by the given WebApplicationInitializer implementations.
      Parameters:
      webAppInitializers - Spring initialization classes
      Returns:
      a deployment configuration with sensible defaults
    • springWithExternalWebResources

      static Deployment springWithExternalWebResources(Path localResources, Class<? extends org.springframework.web.WebApplicationInitializer>... webAppInitializers)
      Deployment configuration for a root web application, with resources fetched from the given path on the local filesystem, and initialized by the given WebApplicationInitializer implementations.
      Parameters:
      localResources - the root path from where the web application resources are fetched
      webAppInitializers - Spring initialization classes
      Returns:
      a deployment configuration with sensible defaults
    • useForwardHeaders

      default Deployment useForwardHeaders()
      Application runs behind a reverse proxy and X-Forwarded-* HTTP headers should be read. It is insecure to run this configuration when not behind a proxy that sets such headers, because a peer address can be forged.
      Returns:
      a modified copy of the deployment configuration
    • enableWebSockets

      default Deployment enableWebSockets(UnaryOperator<io.undertow.websockets.jsr.WebSocketDeploymentInfo> webSocketConfiguration)
      Enable WebSocket support. If no custom configuration is needed, the parameter should just be an identity function.
      Parameters:
      webSocketConfiguration - a function that configures the default WebSocket deployment and returns it
      Returns:
      a modified copy of the deployment configuration
    • withProperties

      default Deployment withProperties(Map<String,String> properties)
      Adds overrides to web application properties.
      Parameters:
      properties - the overriding properties
      Returns:
      a modified copy of the deployment configuration
    • withProperties

      default Deployment withProperties(org.springframework.core.env.EnumerablePropertySource propertySource)
      Adds an additional Spring property source, e.g. SimpleCommandLinePropertySource for overriding application properties from the command line.
      Parameters:
      propertySource - the overriding properties
      Returns:
      a modified copy of the deployment configuration