Commit Graph

7873 Commits

Author SHA1 Message Date
Antonio Marrero
57f7b14b49 Assign lowest priority to /** pattern
Update AntPathMatcher Comparator to treat `/**` in the same way as
`null` paths.

Prior to this commit the pattern `/**` would be picked in preference
to patterns with 3 or more PathVariable (e.g. `/matches/{matchId}/
periods/{periodId}/teams/{teamId}/results`).

Issue: SPR-10550
2013-08-28 17:14:37 -07:00
Phillip Webb
c1dafed886 Refine AntPathMatcher.combine when p1 contains '.'
Refine AntPathMatcher.combine rules to allow direct concatenation of
patterns when pattern1 does not contain '*.'. Prior to this commit
direct concatenation was allowed when pattern1 did not contain '.',
this prevented calls of the form:

	pathMatcher.combine("/1.0", "/foo/test")

from working as expected.

This commit also applies some general cleanup to the `combine` method.

Issue: SPR-10554
2013-08-28 14:30:08 -07:00
Phillip Webb
57dfc13f30 Merge pull request #326 from Xaerxess/SPR-10798
# By Grzegorz Rożniecki
* SPR-10798:
  Fix malformed code in documentation
2013-08-28 14:26:36 -07:00
Grzegorz Rożniecki
00c744ba1a Fix malformed code in documentation
Fixed code snippets in "Handling complex types for stored procedure
calls" paragraph.

Issue: SPR-10798
2013-08-28 14:25:57 -07:00
Phillip Webb
c93fbda56d Merge pull request #335 from clemp6r/SPR-10850
# By clemp6r
* SPR-10850:
  Fix elvis operator mistake in reference docs
2013-08-28 14:16:15 -07:00
clemp6r
84242f1aff Fix elvis operator mistake in reference docs
In the given example the expression using the Elvis operator will
return "Nikola Tesla" and not "Mike Tesla".

Issue: SPR-10850
2013-08-28 14:16:01 -07:00
Juergen Hoeller
365ce55a93 Polishing 2013-08-28 22:16:20 +02:00
Juergen Hoeller
465e6292eb Javadoc fixes 2013-08-28 22:16:08 +02:00
Juergen Hoeller
fe8dec912d @Bean methods are allowed to override existing bean definitions with a role other than ROLE_APPLICATION now (e.g. framework-generated default beans)
Also, DefaultListableBeanFactory logs a warning when overriding an application definition with a framework-generated definition now, which is expected to be an accident.

Issue: SPR-10607
2013-08-28 22:14:34 +02:00
Rossen Stoyanchev
4b2847d9d1 Add ChannelInterceptor to spring-messaging module
Issue: SPR-10866
2013-08-28 14:41:20 -04:00
Rossen Stoyanchev
467a6b9fa7 Fix failing tests and upgrade websocket to Jetty 9.0.5 2013-08-28 08:43:53 -04:00
Arjen Poutsma
3d645cf808 Added documentation on DecompressingHttpClient
Added documentation on the support for gzip encoding using the
DecompressingHttpClient in Apache HttpComponents.

Issue: SPR-7874
2013-08-28 14:09:07 +02:00
Juergen Hoeller
38c8c6d085 Turned AsyncRequestCallbackAdapter into a private inner class
Issue: SPR-8804
2013-08-28 12:56:18 +02:00
Juergen Hoeller
bb971cecf1 A BeanDefinitionRegistryPostProcessor may register other BeanDefinitionRegistryPostProcessors
We're using the same subtle PriorityOrdered/Ordered/non-ordered separation as for regular BeanFactoryPostProcessors and BeanPostProcessors now. Additionally, we're re-detecting BeanDefinitionRegistryPostProcessor bean names after every invocation phase, up until no further ones appear.

Issue: SPR-10630
2013-08-28 12:49:53 +02:00
Juergen Hoeller
bb18f81b50 Added "recovery-interval" attribute to <jms:listener-container>
Issue: SPR-10711
2013-08-28 09:36:23 +02:00
Rossen Stoyanchev
4c0da5867a Add Java config support for WebSocket and STOMP
Issue: SPR-10835
2013-08-27 22:20:07 -04:00
Rossen Stoyanchev
4b6a9ac180 Polish WebSocketHttpRequestHandler 2013-08-27 22:20:07 -04:00
Juergen Hoeller
4447248a83 Introduced support for @Lazy on injection points
This turned into a rather huge affair since it led to the introduction of a new AutowireCandidateResolver implementation in the spring-context module. That ACR impl is now being set through AnnotationConfigUtils; GenericApplicationContext and co do not set a default QualifierAnnotationAutowireCandidateResolver anymore (which has always been a smell anyway).  At the same time, dependency ordering has moved from AutowiredAnnotationBeanPostProcessor to DefaultListableBeanFactory itself through a "dependencyComparator" strategy, applying to constructor dependencies and lazy resolution proxies as well.

Issue: SPR-10353
2013-08-28 00:14:39 +02:00
Juergen Hoeller
01b8d9327d AnnotationConfigWebApplicationContext allows for repeated register/scan calls
Restoring consistency with AnnotationConfigApplicationContext.

Issue: SPR-10852
2013-08-28 00:04:53 +02:00
Juergen Hoeller
091712df06 Consistent use of Class<?> 2013-08-28 00:03:58 +02:00
Juergen Hoeller
e812b6cea0 Marked @Profile as @Documented 2013-08-28 00:03:40 +02:00
Juergen Hoeller
5efe894ee4 Not exposing ApplicationContext on ConditionContext anymore 2013-08-28 00:00:54 +02:00
Juergen Hoeller
1e64eed6b2 Reintroducing deprecated addConstructorArg variant
Still used by Spring Security 2.0.x's NamespaceHandler etc.
2013-08-27 23:29:41 +02:00
Juergen Hoeller
b75fa9d7a7 Upgraded to Reactor 1.0 M2 release 2013-08-27 23:27:35 +02:00
Rob Winch
6969ae94a0 Merge pull request #346 from rwinch/SPR-10860
Restore method signatures on MediaType
2013-08-27 13:00:35 -07:00
Rob Winch
00bc54dcc5 Restore method signatures on MediaType
Previously the method signatures for includes and isCompatibleWith were
incompatible with Spring 3.2.x since the argument was now MimeType.
This caused NoSuchMethodError to be thrown when a class was compiled
against MediaType from Spring 3.2.x and ran against MediaType
from Spring 4.x.

This commit restores the signatures and implements each method by
invoking the super class method.

Issue: SPR-10860
2013-08-27 14:37:56 -05:00
Rossen Stoyanchev
750930fa25 Fix bug with the order of messaging arg resolvers 2013-08-27 15:05:34 -04:00
Arjen Poutsma
ebcee26d57 Add AsyncRestTemplate
Added AsyncRestTemplate, the asynchronous counterpart to the
RestTemplate that was introduced in Spring 3. All methods on the
AsyncRestTemplate are similar to those found on the synchronous
RestTemplatem, except that they return Future wrappers instead of
concrete results.

To enable this, this commit introduces the AsyncClientHttpRequest and
AsyncClientHttpRequestFactory, similar to the ClientHttpRequest and
ClientHttpRequestFactory, except that ClientHttpRequest returns a
Future<ClientHttpResponse> for the execute method. Two implementations
of these interfaces are provided, one based on the HttpURLConnection
incombination with a Spring AsyncTaskExecutor and one based on Apache
HttpComponents HttpAsyncClient.

Issue: SPR-8804
2013-08-27 14:22:37 -04:00
Phillip Webb
89b53cfcd5 Javadoc that @Conditionals are not inherited
Issue: SPR-10840
2013-08-27 10:48:38 -07:00
Phillip Webb
ced5ea2f93 Revert "Ensure @Conditions consider super classes"
This reverts commit 620c16f5c7.
2013-08-27 10:39:51 -07:00
Rossen Stoyanchev
402a3b8473 Fix javadoc 2013-08-27 12:48:48 -04:00
Jan Machacek
3f130a1c08 Add support for custom types in AMMH 2013-08-27 12:43:21 -04:00
Jan Machacek
c48a41ea7a Fix minor issue in JettyRequestUpgradeStrategy
Issue: SPR-10861
2013-08-27 12:34:11 -04:00
Rossen Stoyanchev
ed9b2966c0 Revise use of FilterChain in MockMvc
MockFilterChain should not be re-used across requests. This is not an
issue unless tests are executed concurrently. This change ensures the
MockFilterChain is re-created for each request in MockMvc.

Issue: SPR-10838
2013-08-27 11:48:03 -04:00
Phillip Webb
620c16f5c7 Ensure @Conditions consider super classes
Fix @Condition evaluation to also consider super classes for both
@Configuration classes and regular @Components. This change allows
@Conditional annotations to be inherited and restores the previous
behavior of @Profile.

Issue: SPR-10840
2013-08-26 17:12:02 -07:00
Juergen Hoeller
8f90eacd92 Polishing 2013-08-26 20:04:40 +02:00
Juergen Hoeller
aecf60d21f Discovering and accumulating all @Profile meta-annotations
Issue: SPR-10812
2013-08-26 20:03:32 +02:00
Juergen Hoeller
c9771012e9 Introduced @Description annotation for populating BeanDefinition.getDescription()
Issue: SPR-10583
2013-08-23 16:49:25 +02:00
Rossen Stoyanchev
cf2e1ffc65 Fix failing test
Issue: SPR-10605
2013-08-22 21:53:57 -04:00
Rossen Stoyanchev
64baef9f19 Fix failing tests
Issue: SPR-10825
2013-08-22 20:56:50 -04:00
Rossen Stoyanchev
a5143057ce Add configurability for underlying WebSocket engine
Issue: SPR-10844
2013-08-22 20:35:03 -04:00
Rossen Stoyanchev
ccaa101252 Fix typo 2013-08-22 16:09:32 -04:00
Gabriel Axel
d66206704e Fix NPE in ResourceHttpMessageConverter
ResourceHttpMessageConverter tries to use the filename to determine the
media type, but for Resource implementations such as ByteArrayResource
it is null, which causes NullPointerException. The fix checks whether
getFilename returns null before attempting to determine the media type
by it.

Issue: SPR-10848
2013-08-22 16:05:44 -04:00
Rossen Stoyanchev
a455217743 Modify how SpringConfigurator finds Endpoint singleton
First try the endpoint type name converted to property
Then try @Component value

Issue: SPR-10605
2013-08-22 16:05:44 -04:00
Rossen Stoyanchev
c211c98b40 Support placeholder values in Spring MVC Test
Issue: SPR-10825
2013-08-22 16:05:44 -04:00
Dmitry Katsubo
47d40053a4 Add Jackson serialization inclusion to FactoryBean
Issue: SPR-10810
2013-08-22 16:05:44 -04:00
Rossen Stoyanchev
08d36cf2e4 Allow custom expand algorithm in UriComponents
Issue: SPR-10647
2013-08-22 16:05:44 -04:00
Rossen Stoyanchev
1fd7bc3ee5 Make MediaType serializable
Issue: SPR-8738
2013-08-22 16:05:44 -04:00
Juergen Hoeller
88115212eb Consistent xsd header formatting 2013-08-22 19:37:42 +02:00
Juergen Hoeller
3d462b6dd9 Added missing spring.schemas entries for 4.0 xsds
Also fixing an old XmlBeanFactory test that relies on "ref local" which is gone in the 4.0 xsd now, redeclaring the affected file to an older xsd version.
2013-08-22 19:36:53 +02:00