Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Jun 20, 2019
1 parent da582da commit f56c54d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ public MultiValueMap<String, String> read(@Nullable Class<? extends MultiValueMa
public void write(MultiValueMap<String, ?> map, @Nullable MediaType contentType, HttpOutputMessage outputMessage)
throws IOException, HttpMessageNotWritableException {

if (!isMultipart(map, contentType)) {
writeForm((MultiValueMap<String, Object>) map, contentType, outputMessage);
if (isMultipart(map, contentType)) {
writeMultipart((MultiValueMap<String, Object>) map, outputMessage);
}
else {
writeMultipart((MultiValueMap<String, Object>) map, outputMessage);
writeForm((MultiValueMap<String, Object>) map, contentType, outputMessage);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* <p>Classes with {@code @ControllerAdvice} can be declared explicitly as Spring
* beans or auto-detected via classpath scanning. All such beans are sorted via
* {@link org.springframework.core.annotation.AnnotationAwareOrderComparator
* AnnotationAwareOrderComparator}, i.e. based on
* AnnotationAwareOrderComparator}, based on
* {@link org.springframework.core.annotation.Order @Order} and
* {@link org.springframework.core.Ordered Ordered}, and applied in that order
* at runtime. For handling exceptions, an {@code @ExceptionHandler} will be
Expand All @@ -51,12 +51,12 @@
* root exception mappings on a prioritized advice bean with a corresponding order.
*
* <p>By default, the methods in an {@code @ControllerAdvice} apply globally to
* all controllers. Use selectors {@link #annotations},
* all controllers. Use selectors such as {@link #annotations},
* {@link #basePackageClasses}, and {@link #basePackages} (or its alias
* {@link #value}) to define a more narrow subset of targeted controllers.
* If multiple selectors are declared, boolean {@code OR} logic is applied, meaning
* selected controllers should match at least one selector. Note that selector checks
* are performed at runtime and so adding many selectors may negatively impact
* are performed at runtime, so adding many selectors may negatively impact
* performance and add complexity.
*
* @author Rossen Stoyanchev
Expand Down

0 comments on commit f56c54d

Please sign in to comment.