-
Notifications
You must be signed in to change notification settings - Fork 42
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
fix: don’t leakage Micronaut Validation #1267
Conversation
hibernate-jpa/build.gradle
Outdated
@@ -7,7 +7,7 @@ dependencies { | |||
|
|||
api(libs.managed.hibernate.core) | |||
api(libs.managed.jakarta.transaction.api) | |||
api(mnValidation.micronaut.validation) | |||
implementation(mnValidation.validation) // jakarta.validation:jakarta.validation-api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to include the validation anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will fix the issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dstepanov We need the dependency to jakarta.validation:jakarta.validation-api
because of ValidatorFactorySettingSupplier.
I don't think this will fix the issue
In this PR for hibernate-jpa
build I included:
testImplementation(mnHibernateValidator.micronaut.hibernate.validator)
It seems to get rid of the Multiple possible bean candidates found: [DefaultInternalConstraintValidatorFactory, DefaultConstraintValidatorFactory]
error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put it compile only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quality Gate passedIssues Measures |
Regarding this, it is a patch/workaround to the actual issue. IMO the Hibernate Validator module should be updated to allow it to live side by side with the Micronaut validation module |
The changes in Micronaut Serialization actually broke it, but I think the combination of two shouldn’t be allowed anyway |
@sdelamo Is this going to be reverted maybe after this PR micronaut-projects/micronaut-hibernate-validator#370 ? |
We might need to make remove that second bean from Micronaut Validation, like it was before |
@dstepanov I don't follow what you suggest. |
Close: #1266