Refine SQLErrorCodesFactory reachability on native images #29294
Labels
in: data
Issues in data modules (jdbc, orm, oxm, tx)
theme: aot
An issue related to Ahead-of-time processing
type: enhancement
A general enhancement
Milestone
SQLErrorCodeSQLExceptionTranslator#hasUserProvidedErrorCodesFile
implementation does not currently allow to avoidSQLErrorCodesFactory
constructor to be reachable from a native image POV when there is no customorg/springframework/jdbc/support/sql-error-codes.xml
provided by the user.With a small refactoring introducing a
SQLErrorCodeSQLExceptionTranslator#USER_PROVIDED_ERROR_CODES_FILE_PRESENT
static field and makingSQLErrorCodesFactory#instance
initialization lazy, it is possible to not includeSQLErrorCodesFactory
constructor by default in native images, avoiding to shipXmlBeanDefinitionReader
and related transitive dependencies.The text was updated successfully, but these errors were encountered: