Require bean name match for Locale(Context)Resolver to back off
Web MVC and WebFlux look up by name the Locale(Context)Resolver beans that they use. Previously, the auto-configured resolvers for MVC and WebFlux would back off when any bean of the required type was defined, irrespective of its name. If the name of the user's bean didn't match the name used by MVC and WebFlux to find the custom resolver, the custom resolver would be ignored and MVC and WebFlux would use their defaults. There was no indication of this happening in the condition evaluation report as all it would show is that the auto-configured resolver had backed off in favour of the custom resolver. It wouldn't show anything to explain why the custom resolver had not been used. This commit updates the auto-configured resolvers to be conditional on a missing bean of the name required by MVC and WebFlux. If the user then defines a custom resolver with a different name, the condition evaluation report will show that the auto-configured resolver remained as the bean name didn't match. Fixes gh-24209pull/24230/head
parent
e342d7d262
commit
4a7bc3d096
Loading…
Reference in New Issue