* BAEL-1412 add java 8 spring data features * BAEL-21 new HTTP API overview * BAEL-21 fix executor * BAEL-1432 add custom gradle task * BAEL-1567 add samples of cookie and session in serlvet * BAEL-1567 use stream api * BAEL-1567 fix optional * BAEL-1679 add query annotation jpa spring data * BAEL-1679 added new junits * BAEL-1679 use assertJ, use givenWhenThen naming convention * BAEL-1679 move query annotation examples to persistence modules * BAEL-1679 fix formatting * BAEL-659 add junits for repositories * BAEL-659 add one junit * BAEL-659 remove one duplicated dependency * BAEL-659 fix test class name
22 lines
400 B
Java
22 lines
400 B
Java
package baeldung;
|
|
|
|
import javax.enterprise.inject.Produces;
|
|
import javax.validation.Validation;
|
|
import javax.validation.Validator;
|
|
|
|
/**
|
|
* Created by adam.
|
|
*/
|
|
public class ValidatorProducer {
|
|
|
|
@Produces
|
|
public Validator createValidator() {
|
|
return Validation
|
|
.byDefaultProvider()
|
|
.configure()
|
|
.buildValidatorFactory()
|
|
.getValidator();
|
|
}
|
|
|
|
}
|