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

Register the Hibernate validation message bundle #407

Conversation

kevin-wise
Copy link
Contributor

@kevin-wise kevin-wise commented Jun 12, 2024

Register the Hibernate validation message bundle, so that messages are interpolated correctly. Fixes #410 .

I'm not really sure what made this necessary. I do know that it broke between Micronaut 3 and 4.
Of course, I'm open to other ideas. This was the first one I had that worked.

@kevin-wise kevin-wise mentioned this pull request Jun 12, 2024
Merged
import jakarta.inject.Singleton;

@Singleton
@Requires(bean = MicronautHibernateValidator.class)
Copy link
Contributor Author

@kevin-wise kevin-wise Jun 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to use this?

Suggested change
@Requires(bean = MicronautHibernateValidator.class)
@Requires(resources = "classpath:org/hibernate/validator/ValidationMessages.properties")

@kevin-wise kevin-wise force-pushed the register-hibernate-message-bundle branch from 8808d87 to 78c8ffa Compare June 20, 2024 05:32
@graemerocher graemerocher merged commit df76d3b into micronaut-projects:4.4.x Jun 27, 2024
6 checks passed
@kevin-wise kevin-wise deleted the register-hibernate-message-bundle branch June 27, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Hibernate message bundle should be functional
2 participants