Class MicronautServletConfiguration

java.lang.Object
io.micronaut.servlet.engine.MicronautServletConfiguration
All Implemented Interfaces:
io.micronaut.core.naming.Named, ServletConfiguration

@ConfigurationProperties("micronaut.servlet") public class MicronautServletConfiguration extends Object implements io.micronaut.core.naming.Named, ServletConfiguration
Configuration properties for the Micronaut servlet.
Since:
1.0
Author:
graemerocher
  • Field Details

  • Constructor Details

    • MicronautServletConfiguration

      @ConfigurationInject public MicronautServletConfiguration(@Bindable(defaultValue="micronaut") String name, @Bindable(defaultValue="/*") String mapping, io.micronaut.http.server.HttpServerConfiguration serverConfiguration)
      Default constructor.
      Parameters:
      name - The name of the servlet
      mapping - The servlet mapping
      serverConfiguration - The http server configuration
  • Method Details

    • getMapping

      public String getMapping()
      Returns:
      The servlet mapping.
    • getMultipartConfigElement

      public Optional<jakarta.servlet.MultipartConfigElement> getMultipartConfigElement()
      Returns:
      The configured multipart element if any
    • getName

      @NonNull public @NonNull String getName()
      Specified by:
      getName in interface io.micronaut.core.naming.Named
    • setAsyncFileServingEnabled

      public void setAsyncFileServingEnabled(boolean enabled)
      Is async file serving enabled.
      Parameters:
      enabled - True if it is
    • isAsyncFileServingEnabled

      public boolean isAsyncFileServingEnabled()
      Description copied from interface: ServletConfiguration
      Is async file serving enabled.
      Specified by:
      isAsyncFileServingEnabled in interface ServletConfiguration
      Returns:
      True if it is.