You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JacksonAutoConfiguration class takes care of creating a default ObjectMapper bean. The conditions based on which this configuration gets applied can be documented in a better way. For example, Spring docs link is confusing. As per this, both @Bean and @Primary are needed to replace the default ObjectMapper:
In reality, the @Primary is not necessary, just creating a ObjectMapper bean results in the default jackson ObjectMapper bean not being created. This can result in problems as described in #22403.
This behaviour should be mentioned clearly in the documentation. Also, the Javadoc for JacksonAutoConfiguration states this behaviour and this clarity should be present in the documentation as well.