Package io.micronaut.servlet.engine
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 Summary
Fields inherited from interface io.micronaut.servlet.http.ServletConfiguration
DEFAULT
-
Constructor Summary
ConstructorDescriptionMicronautServletConfiguration
(String name, String mapping, io.micronaut.http.server.HttpServerConfiguration serverConfiguration) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionOptional<jakarta.servlet.MultipartConfigElement>
@NonNull String
getName()
boolean
Is async file serving enabled.void
setAsyncFileServingEnabled
(boolean enabled) Is async file serving enabled.
-
Field Details
-
PREFIX
The prefix used for configuration.- See Also:
-
-
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 servletmapping
- The servlet mappingserverConfiguration
- The http server configuration
-
-
Method Details
-
getMapping
- Returns:
- The servlet mapping.
-
getMultipartConfigElement
- Returns:
- The configured multipart element if any
-
getName
- Specified by:
getName
in interfaceio.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 interfaceServletConfiguration
- Returns:
- True if it is.
-