Skip to content

Controller advisor

Erich Jagomägis edited this page Nov 14, 2023 · 1 revision

Controller advisor is general Exception handler that catches a great variety of exceptions and handles them in accordance to Bitweb standard.

Enabling feature

Core library contains auto-configuration mechanism that configures the addition and propagation of Trace ID to every log entry. In order to enable auto-configuration, simply add property to configuration.

ee.bitweb.core.controller-advice.auto-configuration=true

Following dependencies have to be added as library does not provide transitive dependencies:

implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'

Migration from 2.* to 3.*

To enable feature, change ee.bitweb.core.controller-advice.enabled=true to ee.bitweb.core.controller-advice.auto-configuration=true.

Error message formats also changed for following exceptions: MissingServletRequestPartException, HttpRequestMethodNotSupportedException, BindException.

Clone this wiki locally