Package io.micronaut.problem.conf
Class ProblemConfigurationProperties
java.lang.Object
io.micronaut.problem.conf.ProblemConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,ProblemConfiguration
@ConfigurationProperties("problem")
public class ProblemConfigurationProperties
extends Object
implements ProblemConfiguration
ConfigurationProperties
implementation of ProblemConfiguration
.- Since:
- 1.0
- Author:
- Sergio del Amo
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
The default enable value.static final boolean
The default stackTrace value.static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
setEnabled
(boolean enabled) Sets whether the configuration is enabled.void
setStackTrace
(boolean stackTrace)
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
DEFAULT_STACK_TRACKE
public static final boolean DEFAULT_STACK_TRACKEThe default stackTrace value.- See Also:
-
-
Constructor Details
-
ProblemConfigurationProperties
public ProblemConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Sets whether the configuration is enabled. Default value true.- Parameters:
enabled
- True if it is enabled
-
isStackTrace
public boolean isStackTrace()- Specified by:
isStackTrace
in interfaceProblemConfiguration
- Returns:
- Whether the HTTP Response should include the stack trace for instances of
ThrowableProblem
-
setStackTrace
public void setStackTrace(boolean stackTrace) - Parameters:
stackTrace
- Whether the HTTP Response should include the stack trace for instances ofThrowableProblem
. Default value (false).
-