Apply JSR380: Bean Validation 2.0 annotations
On This Page
This practice should add extra module because it depends on third-party library
javax.validation
Creating an instance validated by JSR380: Bean Validation 2.0 annotations
1. Adding dependency
testImplementation("com.navercorp.fixturemonkey:fixture-monkey-javax-validation:1.1.0")
<dependency>
<groupId>com.navercorp.fixturemonkey</groupId>
<artifactId>fixture-monkey-javax-validation</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
2. Adding plugin
option
FixtureMonkey fixtureMonkey = FixtureMonkey.builder()
.plugin(new JavaxValidationPlugin())
.build();