I want to know how can we exclude specific package from @ControllerAdvice.
That the errors thrown by the classes of that specific package should not be handled.
I want to know how can we exclude specific package from @ControllerAdvice.
That the errors thrown by the classes of that specific package should not be handled.
You can set @ControllerAdvice to work on specific package via :
@ControllerAdvice(basePackages={"my.pkg.a", "my.pkg.b"})
Don't mention the package that you want to ignore. There is no option for excluding a specific package, but for including is there.