belgif / rest-problem-java

Java library for RFC 9457 Problems with support for standard problem types of the Belgif REST guide (https://www.belgif.be/specification/rest/api-guide/#error-handling)
https://belgif.github.io/rest-problem-java/
Apache License 2.0
3 stars 0 forks source link

Add core users of rest-problem-java library to DEFAULT_SCAN_PACKAGES of SpringProblemTypeRegistry #2

Closed jpraet closed 4 months ago

jpraet commented 5 months ago

SpringProblemTypeRegistry uses classpath scanning for discovering @ProblemTypes.

By default, it currently scans these base packages:

Additional packages can be configured with the io.github.belgif.rest.problem.spring.scan-additional-problem-packages property. For convenience, the base packages of the core users of the rest-problem-java library could be added to the default list.

pvdbosch commented 4 months ago

Do we need to maintain a central list? Maybe it's possible to maintain organization-specific defaults in an organization-specific library. We're trying out use of @PropertySource as described in https://stackoverflow.com/a/28894906 . We'll probably need such a library anyway e.g. for jackson serialization defaults.

jpraet commented 4 months ago

Leaving it up to the users to configure io.github.belgif.rest.problem.spring.scan-additional-problem-packages in their own application, or in an organization-specific library is fine by me.

Shall I remove be.fgov.kszbcss from the default packages then?

pvdbosch commented 4 months ago

Shall I remove be.fgov.kszbcss from the default packages then?

Yes, that's OK for me.