Sam Brannen
eef9bc899f
Avoid NPE in FreeMarkerView.getModelAttributes() in spring-webflux
...
This commit declares the model method parameter as @Nullable and adds
defensive guards against a null model argument.
Closes gh-23105
2019-06-13 01:40:22 +03:00
Sam Brannen
9fb973d4f3
Polish JavaDoc for FreeMarkerView in spring-webflux
...
See gh-23105
2019-06-12 22:42:29 +03:00
Sam Brannen
a4f4ef9011
Update documentation for spring.ftl in spring-webflux
...
See gh-23105
2019-06-12 22:40:13 +03:00
Sam Brannen
cc4593fda8
Improve FreeMarker macro support in spring-webflux
...
This commit improves the FreeMarker macro support in spring-webflux by
automatically exposing a RequestContext under the name
"springMacroRequestContext" for use with Spring's FreeMarker macros in
spring.ftl.
This aligns with the user experience for FreeMarkerView in spring-webmvc.
Closes gh-23105
2019-06-12 17:00:21 +03:00
Juergen Hoeller
7e02358166
Merge branch '5.1.x'
2019-06-12 00:05:01 +02:00
Juergen Hoeller
33b5bc2aae
Polishing
2019-06-11 23:50:29 +02:00
Juergen Hoeller
a89bfffd8c
Merge branch '5.1.x'
2019-06-11 23:16:03 +02:00
Juergen Hoeller
7dc92aa05d
Polishing
2019-06-11 20:57:27 +02:00
Rossen Stoyanchev
0757eaee9d
Clear ProducesRequestCondition attribute
...
Closes gh-23091
2019-06-11 13:55:20 -04:00
Sam Brannen
a5828ca14e
Polish JavaDoc for AbstractView in spring-webflux
2019-06-11 16:28:25 +03:00
Sam Brannen
7a87d86b80
Fix documentation for FreeMarker bind macro in spring-webflux
...
See gh-23002
2019-06-10 16:39:54 +03:00
Sam Brannen
2f640fe205
Polish FreeMarker macro support in spring-webflux
...
See gh-23002
2019-06-10 16:13:20 +03:00
Sam Brannen
ac28de0dc1
Polish Javadoc for FreeMarker support
2019-06-10 16:03:16 +03:00
Issam EL-ATIF
b58f34d802
Add FreeMarker macro support in spring-webflux
...
Closes gh-23002
2019-06-09 16:30:05 +03:00
Rossen Stoyanchev
331463739d
Merge branch '5.1.x'
2019-06-07 16:26:00 -04:00
Rossen Stoyanchev
9ce5a18d96
Ignore null attributes in AbstractView
...
Consistent with ConcurrentModel and also with treatment of empty values
from async attributes.
Closes gh-23038
2019-06-07 16:25:47 -04:00
Sebastien Deleuze
098ac0bbb8
Annotate Object#equals parameter with @Nullable
...
Closes gh-23093
2019-06-06 14:18:30 +02:00
Sebastien Deleuze
23e617160f
Use a timeout != 0 in InvocableHandlerMethodTests
2019-06-05 11:52:08 +02:00
Сергей Цыпанов
aaeabc3c85
Simplify iteration over maps
...
Closes gh-23053
2019-05-29 18:00:34 +02:00
Brian Clozel
4b8ce04bdc
Mark Spring web config classes as proxyBeanMethods=false
...
Closes gh-23004
2019-05-28 19:11:35 +02:00
Sam Brannen
141ef9082f
Clean up Mockito usage
...
This commit migrates to the MockitoJUnitRunner where sensible, which
will later allow for an easier migration to Mockito's extension for
JUnit Jupiter.
In addition, this commit deletes unnecessary stubbing for various mocks
and polishes test fixture setup in various test classes.
2019-05-28 13:59:43 +02:00
Phillip Webb
9d74da006c
Migrate JUnit 4 assertions to AssertJ
...
Migrate all existing JUnit 4 `assert...` based assertions to AssertJ
and add a checkstyle rule to ensure they don't return.
See gh-23022
2019-05-23 15:52:49 -07:00
Phillip Webb
95a9d46a87
Migrate Hamcrest assertions to AssertJ
...
Migrate all existing `assertThat(..., Matcher)` assertions to AssertJ
and add checkstyle rules to ensure they don't return.
See gh-23022
2019-05-23 15:49:59 -07:00
Arjen Poutsma
9b3c92e8d2
Add leading slash for path predicate if not present
...
This commit adds a leading slash for path predicates in both
WebFlux.fn and WebMvc.fn.
Closes gh-22795
2019-05-21 12:09:36 +02:00
Phillip Webb
02850f357f
Migrate exception checking tests to use AssertJ
...
Migrate tests that use `@Test(expectedException=...)` or
`try...fail...catch` to use AssertJ's `assertThatException`
instead.
2019-05-20 10:47:53 -07:00
Rossen Stoyanchev
bd910fc62b
Fix checkstyle errors
2019-05-16 20:49:49 -04:00
Rossen Stoyanchev
60e4649ff3
Merge branch '5.1.x'
2019-05-16 20:42:09 -04:00
Rossen Stoyanchev
da4430e27e
BindingResult for resolved async attributes
...
ViewResolutionResultHandler no longer adds BindingResult objects for
async model attributes. Instead AbstractView adds them later when
those attributes are resolved to concrete values.
Closes gh-22933
2019-05-16 20:41:37 -04:00
Rossen Stoyanchev
172afb510a
Polish AbstractView in WebFlux
2019-05-16 14:37:04 -04:00
stsypanov
9ca8681f79
Iteration over a map using EntrySet
2019-05-13 15:38:13 +02:00
Juergen Hoeller
cfc4a59135
Merge branch '5.1.x'
2019-05-13 13:40:07 +02:00
Juergen Hoeller
daee6f5bd9
Avoid expensive assertions in web resource resolution
...
Closes gh-22955
2019-05-13 13:28:07 +02:00
Sam Brannen
73dbd06361
Enforces static imports for JUnit 4 assertions and assumptions
...
This commit configures Checkstyle to enforces static imports for JUnit 4
assertions and assumptions.
See gh-22932
2019-05-12 15:13:07 +02:00
Sam Brannen
724c805211
Discontinue use of JUnit 3 APIs
...
This commit also ensures that the JSR-330 TCK is executed with the
normal build by adhering to naming conventions for test classes.
See gh-22894
2019-05-12 14:46:55 +02:00
Phillip Webb
798b51f4a3
Migrate to BDD Mockito
...
Migrate all tests to consistently use BDD Mockito. Also add
checksyle rule to enforce going forwards.
2019-05-08 13:46:13 -07:00
Phillip Webb
816bbee8de
Remove '.*' imports from tests
...
Organize test imports to expand all '.*' static imports into
fully qualified imports.
This update will allow us to use additional checkstyle rules in
the future, and will also help if we migrate fully to AssertJ.
2019-05-08 09:55:09 -07:00
Sam Brannen
4d1637a9b7
Avoid warnings in RequestMappingHandlerMappingTests
2019-05-08 16:29:31 +02:00
Phil Webb
d7320de871
Migrate away from ExpectedException ( #22922 )
...
* Add limited checkstyles to test code
Add a limited set of checkstyle rules to the test codebase to improve
code consistency.
* Fix checksyle violations in test code
* Organize imports to fix checkstyle for test code
* Migrate to assertThatExceptionOfType
Migrate aware from ExpectedException rules to AssertJ exception
assertions. Also include a checkstyle rules to ensure that the
the ExpectedException is not accidentally used in the future.
See gh-22894
2019-05-08 16:25:52 +02:00
Arjen Poutsma
2352688ccb
MultipartIntegrationTests should not bind to same part multiple times
...
DefaultMultipartMessageReader does not cache the part contents, so
binding to the same part multiple times does not work.
Rewrote this test to use separate HTTP request instead.
2019-05-08 12:10:20 +02:00
Rossen Stoyanchev
45147c23c1
Empty body checks in ConsumesRequestCondition
...
Normally consumes matches the "Content-Type" header but what should be done if
there is no content? This commit adds checks for method parameters with
@RequestBody(required=false) and if "false" then also match requests with no content.
Closes gh-22010
2019-05-07 22:03:36 -04:00
Arjen Poutsma
59f6044c09
Add route(RequestPredicate, HandlerFunction) to RouterFunctions builder
...
Closes gh-22701
2019-05-07 15:06:59 +02:00
Juergen Hoeller
28c5d7b586
Merge branch '5.1.x'
2019-05-07 02:12:11 +02:00
Juergen Hoeller
d16beb0e55
Polishing
...
See gh-22900
2019-05-07 01:40:53 +02:00
Juergen Hoeller
f56c70d2f0
Merge branch '5.1.x'
2019-05-07 01:23:16 +02:00
Stephane Maldini
fd36d1efe6
Use explicit expectError(class.java) instead of reactor kotlin extension
2019-05-06 16:22:25 -07:00
Juergen Hoeller
c841b62bb0
Consistent parameter retrieval across InvocableHandlerMethod variants
...
See gh-22900
2019-05-07 01:20:05 +02:00
Stephane Maldini
3f8be3416e
Use explicit cast to avoid dependency on reactor-core kotlin extension
2019-05-06 16:13:05 -07:00
Juergen Hoeller
4b06d8e511
Merge branch '5.1.x'
2019-05-07 00:59:56 +02:00
Juergen Hoeller
3f85a7db1b
Consistent exception naming across InvocableHandlerMethod variants
...
See gh-22900
2019-05-07 00:48:27 +02:00
Ippei Nawate
47ff92873b
Add null check
2019-05-07 00:23:48 +02:00