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
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default enable value.static final booleanThe default stackTrace value.static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidsetEnabled(boolean enabled) Sets whether the configuration is enabled.voidsetStackTrace(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:
isEnabledin 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:
isStackTracein 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).
-