Class ContractSpringProperties.WebExceptionHandlerSettings
java.lang.Object
media.barney.contract.spring.ContractSpringProperties.WebExceptionHandlerSettings
- Enclosing class:
ContractSpringProperties
@API(status=MAINTAINED)
public static final class ContractSpringProperties.WebExceptionHandlerSettings
extends Object
Settings for
contract.spring.web-exception-handler.
This integration is intentionally opt-in. It handles only contract-java runtime bridge violations and maps them to server errors because contract violations indicate programming mistakes, not recoverable request validation failures.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the servlet exception resolver is enabled.voidsetEnabled(boolean enabled) Sets whether the servlet exception resolver is enabled.
-
Constructor Details
-
WebExceptionHandlerSettings
public WebExceptionHandlerSettings()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Returns whether the servlet exception resolver is enabled.- Returns:
truewhen the resolver should be registered
-
setEnabled
public void setEnabled(boolean enabled) Sets whether the servlet exception resolver is enabled.- Parameters:
enabled-trueto register the resolver when servlet MVC classes are available
-