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

Auto-configure Hibernate with a JsonFormatMapper #42676

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nosan
Copy link
Contributor

@nosan nosan commented Oct 14, 2024

@nosan nosan changed the title Auto-configure Hibernate with a JsonFormatMapper. Auto-configure Hibernate with a JsonFormatMapper Oct 14, 2024
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 14, 2024
@wilkinsona
Copy link
Member

Thanks, @nosan.

Before merging this, we should consider if we want a way to disable it (an application property?) as it has the potential to be a breaking change.

@wilkinsona wilkinsona added type: enhancement A general enhancement for: merge-with-amendments Needs some changes when we merge and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 15, 2024
@wilkinsona wilkinsona added this to the 3.x milestone Oct 15, 2024
@nosan
Copy link
Contributor Author

nosan commented Oct 15, 2024

Thanks, @wilkinsona
I was also thinking about this but I have not found a good name for it. Maybe spring.jpa.hibernate.auto-configure.json-format-mapper ?

@nosan
Copy link
Contributor Author

nosan commented Oct 15, 2024

I also used
properties.putIfAbsent in case someone already has registered they own JsonFormatMapper

@wilkinsona
Copy link
Member

wilkinsona commented Oct 18, 2024

Thanks, @nosan. While looking for some inspiration for a property name, a couple of other things came to mind. I've noted them in a comment on 33870. I'll put this on hold for now until we've had a chance to figure those out.

@wilkinsona wilkinsona added status: on-hold We can't start working on this issue yet and removed for: merge-with-amendments Needs some changes when we merge labels Oct 18, 2024
@nosan
Copy link
Contributor Author

nosan commented Oct 18, 2024

Thanks, @wilkinsona. That makes sense.

What do you think about the following property format?

spring.jpa.hibernate.auto-configure.json-format-mapper=none
spring.jpa.hibernate.auto-configure.json-format-mapper=jackson
spring.jpa.hibernate.auto-configure.json-format-mapper=jsonb

By default, for example, jackson, as it is more popular.

@wilkinsona
Copy link
Member

I'm not sure, unfortunately. I'm wondering if we need to widen the scope of the existing MVC-specific property and rename it to be more generally applicable. Let's keep that discussion to #33870 and then come back here once we're ready to update the proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: on-hold We can't start working on this issue yet type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants