Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JacksonJsonpMapper bean autoconfigure condition bug #36107

Closed
Pengfei-Lu opened this issue Jun 29, 2023 · 1 comment
Closed

JacksonJsonpMapper bean autoconfigure condition bug #36107

Pengfei-Lu opened this issue Jun 29, 2023 · 1 comment
Labels
status: superseded An issue that has been superseded by another

Comments

@Pengfei-Lu
Copy link
Contributor

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)

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 29, 2023
Pengfei-Lu added a commit to Pengfei-Lu/spring-boot that referenced this issue Jun 29, 2023
Pengfei-Lu added a commit to Pengfei-Lu/spring-boot that referenced this issue Jun 29, 2023
@wilkinsona wilkinsona added status: superseded An issue that has been superseded by another and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 29, 2023
@wilkinsona
Copy link
Member

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

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2023
Pengfei-Lu added a commit to Pengfei-Lu/spring-boot that referenced this issue Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

3 participants