Spring Boot version

3.1.1

Bug description

The autoconfigured JacksonJsonpMapper bean used to depend on a global ObjectMapper bean before SpringBoot version v3.0.3.

After this commit introduced by SpringBoot version v3.0.3, the global ObjectMapper bean is not required when creating JacksonJsonpMapper bean.

However, the JacksonJsonpMapper bean creation condition @ConditionalOnBean(ObjectMapper.class) is not changed, resulting in JacksonJsonpMapper bean can be created only when ObjectMapper bean is present instead of the ObjectMapper class.

Bug resolving solution

Change @ConditionalOnBean(ObjectMapper.class) to @ConditionalOnClass(ObjectMapper.class)

Comment From: wilkinsona

Thanks, @Pengfei-Lu. If you intend to open a pull request, there's no need to open an issue as well.