-
Notifications
You must be signed in to change notification settings - Fork 5
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
Jax-RS 2.1 #51
base: master
Are you sure you want to change the base?
Jax-RS 2.1 #51
Conversation
c69f5e4
to
de1cd2c
Compare
abd8e9c
to
6bfd4af
Compare
bf9652b
to
439776a
Compare
|
||
final Map<String, Set<ConstraintViolation<Object>>> violationMap = new LinkedHashMap<>(); | ||
boolean hasViolation = false; | ||
for (int i = 0; i < method.getParameterCount(); ++i) { |
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.
final boolean showStackTrace) { | ||
|
||
super(e, uriInfo, showStackTrace); | ||
violations = StreamSupport.stream(e.getConstraintViolations().spliterator(), false).map(v -> new ConstraintViolationElement(v)).collect(Collectors.toList()); |
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.
Use the new version of spring boot. This will change the SPI because Spring boot now uses Class<?>[] to boostrap rather than Object[]. It also upgrades Mockito to 2.x which requires an additional test scope library for Vert.X mock testing.
Removes deprecation
Versions that are part of the spring-boot are used. Added additional support for JSON-B.
Used ArgumentMatchers
Introduces the use of Bean Validation API to validate the input data. A custom ExceptionMapper and response structure is used to show the error. The sample also adds a validation annotated bean for testing. The exception mapper logging now goes to net.trajano.ms.MicroService rather than individual ones.
BVal is not used and Hibernate Validator is used instead as it is the only one that supports Bean Validation 2.0 right now.
SonarQube analysis reported 5 issues Watch the comments in this conversation to review them. 3 extra issuesNote: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:
|
Use REST Easy 4.0.0.Beta2 to prepare for JAX-RS 2.1
When released bump to version 2.0.0 of the app-ms
Remove deprecated code as well.