Commit Graph

1645 Commits

Author SHA1 Message Date
Arjen Poutsma 00a5106bfa Add route(RequestPredicate, HandlerFunction) to RouterFunctions builder
Closes gh-22701
2019-05-07 16:49:02 +02:00
Arjen Poutsma 55b56b8c5c Javadoc
Closes gh-22893
2019-05-07 15:24:33 +02:00
Sam Brannen ccb01e663a Merge branch '5.1.x' 2019-05-07 13:03:45 +02:00
Sam Brannen 4aaec942c4 Introduce HTTPS mappings in spring.schemas files
Closes gh-22903
2019-05-07 12:56:42 +02:00
Rossen Stoyanchev 53cadf15e7 Deferred handling of Flux error in Spring MVC
This commit defers flushing of the response until the first item is
emitted that needs to be written (and flushed) to the response.

This makes Spring MVC consistent with WebFlux in this regard.

Closes gh-21972
2019-05-06 12:26:25 -04:00
Sam Brannen d616e10dca Use assertThat from Hamcrest instead of JUnit 4
org.junit.Assert.assertThat() is deprecated as of JUnit 4.13.

See gh-22894
2019-05-05 19:26:04 +02:00
Johnny Lim d489227874 Use HttpHeaders constants where possible 2019-05-04 11:14:08 +02:00
Juergen Hoeller f0f6af2926 Merge branch '5.1.x' 2019-05-03 18:13:12 +02:00
Juergen Hoeller a7949ac84a Consistent use of StringUtils.hasLength(String) vs isEmpty(Object) 2019-05-03 17:29:14 +02:00
Juergen Hoeller eaa9a78d5d Merge branch '5.1.x' 2019-05-03 00:23:57 +02:00
Juergen Hoeller 31c3b8a291 Avoid unguarded String concatenation for debug/trace logging
Closes gh-22874
2019-05-03 00:10:56 +02:00
Juergen Hoeller 8a57997d21 Avoid use of Objects.requireNonNull plus related polishing 2019-05-02 16:32:47 +02:00
Rossen Stoyanchev 07c9a0e1f5 Merge branch '5.1.x' 2019-05-01 04:03:21 -04:00
Rossen Stoyanchev b398216191 Fail proactively if lookupPath not in requestUri
Closes gh-22851
2019-05-01 03:57:44 -04:00
Rossen Stoyanchev b5327ef60f Fix regression in ProducesRequestCondition
Closes gh-22853
2019-05-01 02:59:19 -04:00
Juergen Hoeller 52657b68ea Merge branch '5.1.x' 2019-04-30 18:55:34 +02:00
Juergen Hoeller e0423fbdc2 Revise inline comment for logException call
Closes gh-22794
2019-04-30 18:42:53 +02:00
Juergen Hoeller 359c4f091e Add rejectInvalidCookies flag to CookieLocaleResolver
Closes gh-22861
2019-04-30 18:39:58 +02:00
Sebastien Deleuze 89454e69c3 Deprecate MediaType.APPLICATION_JSON_UTF8
This commit deprecates MediaType.APPLICATION_JSON_UTF8 and
MediaType.APPLICATION_PROBLEM_JSON_UTF8 in favor of
MediaType.APPLICATION_JSON and MediaType.APPLICATION_PROBLEM_JSON since
UTF-8 encoding is now handled correctly by most browsers
(related bug has been fixed in Chrome since September 2017).

MediaType.APPLICATION_JSON is now used as the default JSON content type.

Closes gh-22788
2019-04-30 16:11:50 +02:00
Juergen Hoeller 55418b256d Merge branch '5.1.x' 2019-04-26 16:56:04 +02:00
Juergen Hoeller e5e2d2d661 Polishing (includes minor performance refinements from master) 2019-04-26 16:51:18 +02:00
Juergen Hoeller bdd9a557a5 Streamline ReactiveAdapterRegistry.getAdapter usage
Closes gh-22842
2019-04-26 16:49:16 +02:00
Juergen Hoeller ad497c259a Merge branch '5.1.x' 2019-04-25 14:55:04 +02:00
Juergen Hoeller 0cfab87b1f Revise isEligibleValue javadoc towards BeanUtils.isSimpleValueType
See gh-22816
2019-04-25 14:31:09 +02:00
Rossen Stoyanchev 87dd62a4a3 Merge branch '5.1.x' 2019-04-18 22:49:35 -04:00
Rossen Stoyanchev 42fc4a35d5 Ensure flush after StreamingResponseBody
Closes gh-22813
2019-04-18 22:49:23 -04:00
Rossen Stoyanchev c09e711eb2 Unwrap Optional for @RequestParam reverse resolution
Closes gh-22656
2019-04-18 22:40:12 -04:00
Rossen Stoyanchev dbc45319b3 Merge branch '5.1.x' 2019-04-18 11:51:34 -04:00
Rossen Stoyanchev 1a97a26eb7 Disable response caching when controller resolves ETag
See gh-22797
2019-04-18 11:50:43 -04:00
Juergen Hoeller 44df98c82d Merge branch '5.1.x' 2019-04-12 11:37:07 +02:00
Sebastien Deleuze e84347554e Ignore Kotlin script templating tests
Ignore these tests for the time being since they trigger
a NoClassDefFoundError exception with Kotlin 1.3.30.
2019-04-12 11:17:19 +02:00
Juergen Hoeller 722cd179cf Clean up property values registration in SimpleWebApplicationContext
Closes gh-22787
2019-04-12 11:10:11 +02:00
Rossen Stoyanchev a0826a20c3 CorsInterceptor at the front of the chain
Closes gh-22459
2019-04-09 15:43:43 -04:00
Rossen Stoyanchev d1f888a7a9 Empty path mapping behaves consistently
An empty path mapping in an @RequestMapping now consistently matches to
empty paths regardless of whether there are both type and method level,
annotations, or method-level only.

Closes gh-22543
2019-04-09 15:03:43 -04:00
Rossen Stoyanchev f839c1f9cd Remove warning about empty @RequestMapping path
See gh-22543
2019-04-09 15:03:43 -04:00
Sebastien Deleuze cd0b517abf Improve Kotlin documentation 2019-04-09 12:28:00 +02:00
Sam Brannen 72027b1746 Log warning if @RequestMapping method has no explicit mapping
Commit c0b52d09f5 introduced support for
throwing an exception if a @RequestMapping handler method in a Spring
MVC controller was mapped to an empty path. This had negative side
effects for applications that intentionally mapped to an empty path,
potentially alongside a mapping to an explicit path for the same
handler method.

This commit addresses this by logging a warning (instead of throwing an
exception) if a @RequestMapping method is mapped only to empty paths.

This commit also introduces the same support for WebFlux-based
@RequestMapping handler methods.

Closes gh-22543
2019-04-05 19:55:22 +02:00
Sam Brannen 898494a538 Polish AbstractHandlerMethodMapping
See gh-22543
2019-04-05 14:03:10 +02:00
Sam Brannen 3a9262ca1e Fix Javadoc warnings in Gradle build 2019-04-04 17:49:33 +02:00
Sam Brannen c0b52d09f5 Require explicit path mappings for @RequestMapping methods
Prior to this commit, handler methods in Spring MVC controllers were
not required to provide explicit path mappings via @RequestMapping (or
any of its specializations such as @GetMapping). Such handler methods
were effectively mapped to all paths. Consequently, developers may have
unwittingly mapped all requests to a single handler method.

This commit addresses this by enforcing that @RequestMapping methods
are mapped to an explicit path. Note, however, that this is enforced
after type-level and method-level @RequestMapping information has been
merged.

Developers wishing to map to all paths should now add an explicit path
mapping to "/**" or "**".

Closes gh-22543
2019-04-04 17:33:59 +02:00
Sebastien Deleuze 40e4c8068d Polishing 2019-04-04 12:16:18 +02:00
Sebastien Deleuze e6171fb47d Add Kotlin router DSL and extensions for WebMvc.fn
Closes gh-22697
2019-04-04 12:14:27 +02:00
Rossen Stoyanchev 5616eb2e8e Merge branch '5.1.x' 2019-04-03 19:38:21 -04:00
Rossen Stoyanchev 325fb5d97e Unwrap CompletionException in return value handler
See gh-22476
2019-04-03 19:37:13 -04:00
Rossen Stoyanchev 72119ac076 ProducesRequestCondition caches accepted media types
Closes gh-22644
2019-04-03 14:56:30 -04:00
Rossen Stoyanchev 254f06e1a1 Request attribute cache for resolved lookupPath
See gh-22644
2019-04-03 14:56:30 -04:00
Rossen Stoyanchev bb9fcad58a RequestCondition implementations minor refactoring
Reduce object creation by pre-computing instances that can be re-used,
and eliminating collection copying and sorting where not needed.

See gh-22644
2019-04-03 14:56:30 -04:00
Brian Clozel 47c8d1de7b Avoid calling other bean methods in web config
This commit changes the main configuration classes for Spring MVC and
Spring WebFlux to not call other bean methods when setting up the web
infrastructure. This allows configuration classes extending
`DelegatingWebFluxConfiguration` and `DelegatingWebMvcConfiguration`
to opt-in the lite-mode, as introduced in gh-22461.
2019-04-03 10:16:41 +02:00
Juergen Hoeller 2e63c66b0d Merge branch '5.1.x' 2019-04-02 20:13:29 +02:00
Juergen Hoeller 0babc1fb64 Polishing 2019-04-02 20:04:07 +02:00