Apply sorting on detected PersistenceExceptionTranslators
.
Relates to #24634
Comment From: ttddyy
The default PersistenceExceptionTranslator
s, such as AbstractEntityManagerFactoryBean
, are not ordered, so they always come last.
For my usecase, I need my custom one to be first, so it is fine. But, if custom translators need to come after defaults, then, default ones need to have some ordering numbers assigned.
Comment From: jhoeller
As indicated on #25559, I've resolved this in a different way, calling getBeanProvider
with its orderedStream
method (which takes the factory-level dependency comparator into account even for @Order
definitions on @Bean
methods). In order to preserve non-eager init semantics, we're specifically using a new getBeanProvider
variant with an explicit allowEagerInit
flag there now.
Thanks for the pull request, in any case!