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

fix: add @Primary annotation for DefaultConstraintValidatorFactory #370

Merged
merged 3 commits into from
Feb 19, 2024

Conversation

sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Feb 19, 2024

A ConstraintValidationFactory aws added to Micronaut Validation in PR 288. This PR sets the Hibernate Validator as the primary ConstraintValidatorFactory in case there are many in the classpath and avoids:

Caused by: io.micronaut.context.exceptions.NonUniqueBeanException: 
Multiple possible bean candidates found: [DefaultInternalConstraintValidatorFactory, DefaultConstraintValidatorFactory]

see: micronaut-projects/micronaut-sql#1266

renovate bot and others added 3 commits January 30, 2024 11:26
A `ConstraintValidationFactory` aws added to Micronaut Validation in [PR 288](micronaut-projects/micronaut-validation#288). This PR sets the Hibernate Validator as the primary `ConstraintValidatorFactory` in case there are many in the classpath and avoids:

```
Caused by: io.micronaut.context.exceptions.NonUniqueBeanException: Multiple possible bean candidates found: [DefaultInternalConstraintValidatorFactory, DefaultConstraintValidatorFactory]
```

see: micronaut-projects/micronaut-sql#1266
@sdelamo sdelamo added the type: bug Something isn't working label Feb 19, 2024
@sdelamo sdelamo changed the title fix: add @primary annotation for DefaultConstraintValidatorFactory fix: add @Primary annotation for DefaultConstraintValidatorFactory Feb 19, 2024
Copy link

sonarcloud bot commented Feb 19, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@sdelamo sdelamo merged commit cc20d91 into master Feb 19, 2024
11 checks passed
@sdelamo sdelamo deleted the fix-primary branch February 19, 2024 12:14
sdelamo added a commit that referenced this pull request Feb 19, 2024
)

A `ConstraintValidationFactory` aws added to Micronaut Validation in [PR 288](micronaut-projects/micronaut-validation#288). This PR sets the Hibernate Validator as the primary `ConstraintValidatorFactory` in case there are many in the classpath and avoids:

```
Caused by: io.micronaut.context.exceptions.NonUniqueBeanException: Multiple possible bean candidates found: [DefaultInternalConstraintValidatorFactory, DefaultConstraintValidatorFactory]
```

see: micronaut-projects/micronaut-sql#1266

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants