Commit Graph

11891 Commits

Author SHA1 Message Date
Sam Brannen 92e715ed93 Update "What's New" regarding new testing features 2016-03-12 14:46:36 +01:00
Juergen Hoeller f2f87ff1e0 Explicit javadoc references to BeanFactory-based default executor lookup
Issue: SPR-14030
2016-03-11 23:52:31 +01:00
Juergen Hoeller 155fa3754b Consistent lazy resolution of default executor/scheduler for Async/ScheduledAnnotationBeanPostProcessor
Issue: SPR-14030
2016-03-11 23:23:58 +01:00
Phillip Webb 094cf6cafb Support *Aware for @ComponentScan custom filters
Support a limited set of *Aware interfaces for TypeFilters created
via the @ComponentScan annotation.

Issue: SPR-14009
2016-03-11 12:40:42 -08:00
Sam Brannen beb01e674e Merge pull request #991 from philwebb/SPR-13998
* SPR-13998:
  Polish ContextCustomizer support in the TCF
  Introduce ContextCustomizer API in the TestContext Framework
2016-03-11 21:23:26 +01:00
Sam Brannen cbd1342fbb Polish ContextCustomizer support in the TCF
Issue: SPR-13998
2016-03-11 21:22:08 +01:00
Phillip Webb 87a3a5cb3b Introduce ContextCustomizer API in the TestContext Framework
Allow third-parties to contribute ContextCustomizers that can customize
ApplicationContexts created by the Spring TestContext Framework (TCF)
before they are refreshed.

A customizer may be provided via a ContextCustomizerFactory which is
registered with `spring.factories`. Each factory is consulted whenever
a new ApplicationContext needs to be created by the TCF. Factories may
inspect various details about the test and either return a new
ContextCustomizer or null.

ContextCustomizers are similar to ApplicationContextInitializers and
may perform any number of tasks, including bean registration, setting
of active profiles, etc.

Issue: SPR-13998
2016-03-11 20:53:06 +01:00
Juergen Hoeller 406d06118d Latest dependency updates (Caffeine 2.2.2, Gson 2.6.2, Jackson 2.7.2, OkHttp 2.7.5, OpenJPA 2.4.1) 2016-03-11 15:12:14 +01:00
Juergen Hoeller 71294df238 Upgrade to ASM 5.1
Issue: SPR-14037
2016-03-11 15:09:03 +01:00
Juergen Hoeller d124a13eb4 Consistent use of empty enumerations 2016-03-11 15:07:59 +01:00
Juergen Hoeller 8852a5e178 Support for placeholders in @CrossOrigin attributes
Issue: SPR-14010
2016-03-11 15:04:16 +01:00
Juergen Hoeller b4de66ff9a Test for placeholder-specified default value within @Value
Issue: SPR-14025
2016-03-11 15:00:01 +01:00
Juergen Hoeller 0b1639d963 JdbcTemplate passes negative values other than -1 on to the driver (for MySQL's special values)
Issue: SPR-14028
2016-03-11 14:59:00 +01:00
Juergen Hoeller 100f3c5eeb Removed invalid quoting of message arguments from MessageSource examples
Issue: SPR-14003
2016-03-11 12:57:41 +01:00
Juergen Hoeller 0597ff109e Bsh/GroovyScriptFactory reset script cache in case of compilation error
Issue: SPR-14007
2016-03-11 12:55:20 +01:00
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
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
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 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 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