Commit Graph

19930 Commits

Author SHA1 Message Date
Juergen Hoeller
b944283354 ConstructorResolver exposes parameter signature from user-declared class (in case of a CGLIB-generated subclass)
Issue: SPR-14015
2016-03-11 12:52:40 +01:00
Juergen Hoeller
b6f69492a3 NoUniqueBeanDefinitionException exposes beanNamesFound collection
Issue: SPR-13968
2016-03-11 12:49:57 +01:00
Rossen Stoyanchev
68f6cf9d3a Support same user connected to multiple servers
The MultiServerUserRegistry now supports scenarios where the same user
is connected to multiple servers. For such cases the SimpUser returned
from the registry exposes all sessions across all servers.

Issue: SPR-13800
2016-03-10 14:37:22 -05:00
Rossen Stoyanchev
6aa216afb6 Polish SimpUserRegistry related classes
Issue: SPR-13800
2016-03-10 14:37:22 -05:00
Sam Brannen
8222ff465d Merge pull request #996 from philwebb/SPR-14035
* SPR-14035:
  Polish ServletTestExecutionListener[Tests]
  Support servlet listener activate attribute
2016-03-10 17:20:50 +01:00
Sam Brannen
51eccf552f Polish ServletTestExecutionListener[Tests] 2016-03-10 17:20:02 +01:00
Phillip Webb
bb590db396 Support servlet listener activate attribute
Add a ServletTestExecutionListener.ACTIVATE_LISTENER attribute which
can be set on the TestContext to trigger activation of the listener
even if a `@WebAppConfiguration` is not present.

Issue: SPR-14035
2016-03-10 16:54:14 +01:00
Brian Clozel
8ca6a18dae Allow Validator config in XML websocket namespace
This commit adds a new "validator" XML attribute to the
`<websocket:message-broker/>` element. This allows configuring a
specific Validator to be used for payload validation.

Issue: SPR-13996
2016-03-10 16:35:20 +01:00
Stephane Nicoll
8e24a4153c Support ResolvableTypeProvider on simple event pojo
Previously, the generic type of a simple pojo event implementing
ResolvableTypeProvider wasn't detected properly. This commit fixes the
logic when the generic type is not provided to reuse what
PayloadApplicationEvent is already doing anyway.

Issue: SPR-14029
2016-03-09 11:55:20 +01:00
Stephane Nicoll
ed341695a8 Merge pull request #992 from coryfklein/master
* pr/992:
  Fix typo
2016-03-09 08:54:03 +01:00
Cory Klein
71cf7b4053 Fix typo
Closes gh-992
2016-03-09 08:53:47 +01:00
Phillip Webb
2244461778 Allow @ContextConfiguration to be omitted
Prior to this commit, the @ContextConfiguration annotation was required
to be present even if default XML files, Groovy scripts, or
@Configuration classes were detected; however, in such cases the
@ContextConfiguration was typically declared empty and therefore
seemingly unnecessary boilerplate.

This commit permits @ContextConfiguration to be omitted whenever it can
be reasonably deduced. Consequently, integration tests such as the
following are now supported.

    @RunWith(SpringRunner.class)
    public class MyTest {

        @Autowired String myBean;

        @Test public void example() { /* ... */ }

        @Configuration
        static class Config {

            @Bean String myBean() {
                return "Hello";
            }
        }
    }

Issue: SPR-13955
2016-03-08 19:36:49 +01:00
Brian Clozel
0a56667093 Fix SpringUrl Velocity macro URI encoding
Prior to this commit, the springUrl Velocity macro would only prepend
the context to the given URL; this means that the
ServletHttpResponse.encodeUri method is not called and neither the
ResourceUrlProvider.

This commit changes this macro to use RequestContext.getContextUrl which
prepends the context and encodes the URI.

Issue: SPR-14027
2016-03-08 17:07:59 +01:00
Sam Brannen
89cf4772d5 Fix malformed HTML in Javadoc 2016-03-08 15:27:35 +01:00
Sam Brannen
e85a06234b Partial merge of pull request #983 from philwebb/testcontext
* philwebb-testcontext:
  Polishing
  Remove @BootstrapWith from @WebAppConfiguration
2016-03-08 15:19:55 +01:00
Sam Brannen
93fb7be783 Polishing 2016-03-08 15:18:21 +01:00
Phillip Webb
504779e210 Remove @BootstrapWith from @WebAppConfiguration
Update @WebAppConfiguration so that it no longer directly specifies
a TestContextBootstrapper. This allows third parties to use the
annotation in combination with their own bootstrapper.

BootstrapUtils now provides the detection logic for when
WebTestContextBootstrapper should be used.

Issue: SPR-13991
2016-03-08 14:31:06 +01:00
Sam Brannen
0d12b84022 Document single element annotation attribute overrides in "What's New"
Issue: SPR-13972
2016-03-08 14:00:12 +01:00
Rossen Stoyanchev
e97a55ad54 WebClient supports Void response body
WebResponseExtractor uses Mono.when with the response status, headers,
and the decoded body. However when the response body stream is empty
then when completes empty too.

This change adds defaultIfEmpty handling for en empty response body.
2016-03-07 17:07:12 -05:00
Sam Brannen
4bead6e542 Polish Javadoc for @GetMapping
Issue: SPR-13992
2016-03-07 18:18:46 +01:00
Sam Brannen
cbcc9998f1 Support 'produces' and 'consumes' attributes in @DeleteMapping
Issue: SPR-13992
2016-03-07 18:13:40 +01:00
Sam Brannen
bea26413b4 Support 'produces' attribute in @[Post|Put|Patch]Mapping
Issue: SPR-13992
2016-03-07 18:13:40 +01:00
Sam Brannen
78690a24fb Add headers & name attributes to composed @RequestMapping annotations
Issue: SPR-13992
2016-03-07 18:13:40 +01:00
Rossen Stoyanchev
b2648f84ad DefaultWebSessionManager supports multiple sessions
Issue: #64
2016-03-07 11:20:51 -05:00
Sam Brannen
ca8acc8758 Suppress warnings Gradle build 2016-03-07 15:36:46 +01:00
Sam Brannen
eb654dc177 Allow single element to override array in synthesized annotation
This commit picks up where 8ff9e818a5
left off.

Specifically, this commit introduces support that allows a single
element attribute to override an array attribute with a matching
component type when synthesizing annotations (e.g., in annotations
synthesized from attributes that have been merged from the annotation
hierarchy above a composed annotation).

Issue: SPR-13972
2016-03-07 15:22:27 +01:00
Stephane Maldini
1eadee5655 integration build with Reactor Core 2.5.0.M2 2016-03-07 13:57:27 +00:00
Stephane Nicoll
e086a5d58b Polish
Add period unit in the description so that it shows up in the summary
description.
2016-03-06 09:04:59 +01:00
Stephane Nicoll
1772278053 Merge pull request #985 from verydapeng/master
* pr/985:
  Add table title for @Transactional settings
2016-03-04 22:42:59 +01:00
Dapeng
9d4c6e4d06 Add table title for @Transactional settings
Closes gh-985
2016-03-04 22:41:34 +01:00
Rossen Stoyanchev
dfa1938ac1 Update what's new 2016-03-04 16:09:08 -05:00
Rossen Stoyanchev
ff2a911baa Update MVC config to use CNM for static resources
The MVC config now plugs the configured ContentNegotiationManager into
resource request handling.

Issue: SPR-13658
2016-03-04 16:06:01 -05:00
Rossen Stoyanchev
f162256906 Use ContentNegotiationManager for static resources
The ResourceHttpRequestHandler now relies on the conifgured
ContentNegotiationManager to determine the content type for resource
requests rather than implementing that internally.

First we check against the matched resource based on the resource file
extension. Then we expand the check against the request with any
configured content negotiation strategy.

Issue: SPR-13658
2016-03-04 16:06:01 -05:00
Rossen Stoyanchev
1a76f7e9c2 Polish static resource handling 2016-03-04 16:05:49 -05:00
Brian Clozel
5067f00228 Polish
Issue: SPR-14018
2016-03-04 11:38:25 +01:00
Ruben Dijkstra
41da04d386 Remove duplicate slash from resolved WebJar locations
This commit updates the WEBJARS_LOCATION in WebJarResourceResolver to
avoid getting duplicate slashes in resolved resources locations such
as `/webjars//bootstrap/3.3.2/js/bootstrap.min.js`.

Issue: SPR-14018
2016-03-04 11:36:30 +01:00
Rossen Stoyanchev
ca7aeaae35 WebSessionIdResolver now returns List of ids
Issue: #64
2016-03-03 22:32:03 -05:00
Rossen Stoyanchev
dbc6478b8a Refactor HTTP Cookie support
There is now an HttpCookie (simple name-value pair) and separately a
ServerHttpCookie sub-class with additional attributes that a server
can send to clients.

HttpHeaders is no longer the place to access cookies. Instead there is
a read-only HttpCookie map on ServerHttpRequest and a mutable
ServerHttpCookie map on ServerHttpResponse.

Cookies are stored in a map that preserves their order.
2016-03-03 22:17:39 -05:00
Stephane Maldini
a8c777b35f Remove reference to Fluxion 2016-03-04 00:05:35 +00:00
Stephane Maldini
ce4a687cf2 remove reactor-stream and related artefacts, update tests 2016-03-03 23:57:03 +00:00
Rossen Stoyanchev
9e167045fc Update what's new 2016-03-03 14:48:50 -05:00
Rossen Stoyanchev
6f2c968925 Support strict URI variable encoding
The DefaulUriTemplateHandler now provides a strictEncoding property
which if turned on encodes everything outside the reserved char set.

This is in contrast to the default policy of encoding only illegal
charaters depending on the URI component type.

Issue: SPR-11652
2016-03-03 14:37:48 -05:00
Rossen Stoyanchev
e98738d8ba Polish UriTemplateHandler related classes 2016-03-03 13:33:45 -05:00
Brian Clozel
44c32128dc Add newline at the beginning of textarea JSP tags
This commit adds a newline char at the beginning of textarea tags
values. As per the HTML 4.01 spec (and browsers behavior), a line break
following a start tag is ignored.

This can lead to Spring's textarea tag to ignore a line break char at
the beginning of a tag value.

See https://www.w3.org/TR/html401/appendix/notes.html#notes-line-breaks

Issue: SPR-13503
2016-03-03 16:48:17 +01:00
Rossen Stoyanchev
36e2dd90a7 Support contextPath override in ForwardedHeaderFilter
Issue: SPR-13614
2016-03-02 18:38:25 -05:00
Rossen Stoyanchev
6fcc869338 Polish ForwardedHeaderFilter
Issue: SPR-13614
2016-03-02 18:38:25 -05:00
Sam Brannen
067994712d Make TestContextManager.getTestContext() public
This commit changes the visibility of the getTestContext() method in
TestContextManager from 'protected' to 'public' in order to support
test method injection in JUnit 5 and similar use cases.

Issue: SPR-14011
2016-03-02 20:19:25 +01:00
Brian Clozel
50bcd67fb6 Relax SPR-13867 changes for ResourceHttpRequestHandler
Prior to this change, SPR-13867 made sure that any class extending
WebContentGenerator would not overwrite existing HTTP "Cache-Control"
response headers - set by a filter, a Controller handler, etc.

This caused issues with resource handling, since specifying a cache
configuration there would not overwrite default headers set by filters,
for example by Spring Security.

This commit restricts the previous changes to the
RequestMappingHandlerAdapter, in order to avoid overwriting header set
by a filter or a Controller handler in those cases.

Issue: SPR-14005
2016-03-02 17:42:44 +01:00
Sam Brannen
18e9699a2b Demo @ContextConfiguration as composed annotation with ACI
This commit demonstrates how to register one or more @Configuration
classes via an ApplicationContextInitializer in a composed annotation so
that certain @Configuration classes are always registered whenever the
composed annotation is used, even if the composed annotation is used to
declare additional @Configuration classes.
2016-03-02 14:07:15 +01:00
Rossen Stoyanchev
4cf0b59e00 Add ForwardedHeaderFilter
The new Filter is simply a new way of packaging the ability to extract
X-Forwarded-* headers already available via UriComponentsBuilder.

The Filter wraps the request and the effect is that anything using the
request will see the original schem, host, and port.

Issue: SPR-13614
2016-03-01 23:33:36 -05:00