Commit Graph

20694 Commits

Author SHA1 Message Date
Juergen Hoeller 06cfd80c1c Avoid full synchronization in refreshable getBeanFactory() implementation
Closes gh-25081
2020-05-18 14:22:24 +02:00
Juergen Hoeller 35f3277910 Revised javadoc note on Lookup annotation limitations/recommendations
Closes gh-25044
2020-05-18 14:21:14 +02:00
Juergen Hoeller 28177ad91b Explicit notes on access to standard context beans in SpEL expressions
Closes gh-25037
2020-05-18 14:19:05 +02:00
Yanming Zhou 9d429e30de Fix SpelEvaluationException with example code
org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'name' cannot be found on null
2020-05-18 14:16:15 +02:00
Juergen Hoeller e660386670 Upgrade to Checkstyle 8.32, Tomcat 9.0.35, Netty 4.1.50, Jackson 2.10.4, Hibernate ORM 5.4.15, Hibernate Validator 6.1.5 2020-05-14 00:23:50 +02:00
Juergen Hoeller fe33822fa7 Polishing 2020-05-14 00:23:20 +02:00
Juergen Hoeller 8212aaf3bb ResolvableType ignores TypeNotPresentException from generic signature
Closes gh-25064
2020-05-14 00:22:58 +02:00
Andy Wilkinson 1015f79b42 Include timeout unit in shutdown failure logging
Closes gh-25058
2020-05-12 18:42:40 +02:00
Rossen Stoyanchev ef27bc4b82 Upgrade to RSocket 1.0.0
Closes gh-25053
2020-05-12 12:00:06 +01:00
Rossen Stoyanchev 7c9ad6dd08 Add deprecation notes to the WebMvc config schema
Closes gh-23915
2020-05-12 06:50:09 +01:00
Yanming Zhou 50a4fdac6e
Use Map::computeIfAbsent to simplify scope implementations
Closes gh-25038
2020-05-10 15:41:00 +02:00
Sam Brannen f5d011cb82 Filter reactive tx managers in TransactionAttributeSourceClassFilter
Prior to this commit, the TransactionAttributeSourceClassFilter
filtered out PlatformTransactionManager but not
ReactiveTransactionManager implementations.

TransactionAttributeSourceClassFilter now filters out any
TransactionManager implementation, covering both imperative and
reactive transaction managers.
2020-05-09 13:57:03 +02:00
Sam Brannen ec3d647d1d Update spring-tx.xsd regarding reactive tx mgmt support
Closes gh-25030
2020-05-08 19:49:00 +02:00
Sam Brannen 0f22a5e409 Update Javadoc regarding reactive tx mgmt support
See gh-25030
2020-05-08 19:25:22 +02:00
Sam Brannen e1b2cafb33 Polish reactive transaction mgmt documentation in reference manual
See gh-25030
2020-05-08 18:13:31 +02:00
Mark Paluch 7fbdc3ad11 Document ReactiveTransactionManager support in reference manual
See gh-25030.
2020-05-08 16:11:02 +02:00
Rossen Stoyanchev 706446a660 Deprecate unused method 2020-05-08 14:30:10 +01:00
Rossen Stoyanchev 19ba9087f5 HttpHeaders#equals handles wrapping correctly
Closes gh-25034
2020-05-08 09:37:37 +01:00
Sam Brannen 4805288122 Use SingletonSupplier for XStream instance in XStreamMarshaller
Closes gh-25017
2020-05-07 12:35:32 +02:00
Sam Brannen ce11fdfa80 Fix concurrency issues in XStreamMarshaller
Prior to this commit, if an instance of XStreamMarshaller was used
concurrently from multiple threads without having first invoked the
afterPropertiesSet() method, the private `xstream` field could be
initialized multiple times resulting in a ConcurrentModificationException
in XStream's internal DefaultConverterLookup.

This commit fixes these concurrency issues by making the `xstream` field
volatile and by implementing a double-checked locking algorithm in
getXStream() to avoid concurrent instance creation.

Closes gh-25017
2020-05-06 18:49:47 +02:00
Sam Brannen 740f0d766f Polish XStreamMarshallerTests 2020-05-06 18:17:09 +02:00
Rossen Stoyanchev 53e018362f Update samples to latest RSocket API
A follow-up fix on the upgrade to 1.0 RC7 in gh-24934,
2020-05-06 14:28:18 +01:00
swapy 9288067ea8 Add missing @PathVariable declarations in examples
Closes gh-25006
2020-05-04 11:19:19 +02:00
Rossen Stoyanchev 6659e96104 Fix failing test
See gh-24986
2020-05-01 18:20:26 +01:00
Rossen Stoyanchev aa97563853 Add UnknownContentTypeException
Closes gh-24964
2020-05-01 17:32:19 +01:00
Rossen Stoyanchev c35b3e5c82 Fix race condition in WriteResultPublisher
Closes gh-24989
2020-05-01 17:06:18 +01:00
Rossen Stoyanchev e17736dd0a Error handling improvement in AbstractSockJsSession
Closes gh-24986
2020-05-01 16:45:25 +01:00
Rossen Stoyanchev c2cce0c547 Add isDeferred to ReactiveTypeDescriptor
Closes gh-24995
2020-05-01 15:39:52 +01:00
Stephane Nicoll a5c6294d62 Next Development Version 2020-04-28 10:58:49 +02:00
Rossen Stoyanchev d2bcf1ed71 Upgrade to RSocket 1.0.0-RC7
Closes gh-24934
2020-04-28 06:28:04 +01:00
Rossen Stoyanchev afc8a5d786 Upgrade to Reactor Dysprosium-SR7
Closes gh-24892
2020-04-27 13:24:53 +01:00
Rossen Stoyanchev f425a993e7 Ignore missing STOMP decoder if session closed
Closes gh-24842
2020-04-27 13:19:43 +01:00
Juergen Hoeller 57f1e86a35 AnnotationBeanNameGenerator caches meta-annotations for stereotype check
Closes gh-24980
2020-04-27 13:47:58 +02:00
Juergen Hoeller 73fadd8b7c Polishing 2020-04-27 11:45:41 +02:00
Juergen Hoeller 127e879726 Store source in index-derived ScannedGenericBeanDefinition as well
Includes consistent constructor-level storage of derived resource in ScannedGenericBeanDefinition and ConfigurationClassBeanDefinition.

Closes gh-24978
2020-04-27 11:45:08 +02:00
Sam Brannen 59ecd4997c Optimize toString() for synthesized annotations
This commit moves the toString() implementation for synthesized
annotations from TypeMappedAnnotation to
SynthesizedMergedAnnotationInvocationHandler in order to take advantage
of the synthesized annotation attribute value cache introduced in
72b1abd226.

Closes gh-24970
2020-04-26 14:14:07 +02:00
Sam Brannen db45b80b1f Suppress warnings for deprecated AnnotationFilter.NONE enum constant
See gh-24932
2020-04-26 13:58:31 +02:00
Juergen Hoeller f6df21eaa9 Upgrade to Mockito 3.3.3, MockK 1.10, HtmlUnit 2.39, Checkstyle 8.31 2020-04-25 18:00:34 +02:00
Juergen Hoeller ad088f2157 Polishing 2020-04-25 17:59:04 +02:00
Juergen Hoeller 5bca18f091 Upgrade to Netty 4.1.49, Groovy 2.5.11, Log4J 2.13.2, Hibernate Validator 6.1.4 2020-04-25 16:37:58 +02:00
Juergen Hoeller af65b1ca62 Polishing 2020-04-25 16:37:16 +02:00
Juergen Hoeller e5a292fb34 Deprecate AnnotationFilter.NONE and document MergedAnnotations design
Closes gh-24932
2020-04-25 16:36:44 +02:00
Juergen Hoeller e36a415994 Explain FactoryBean lifecycle management and destroy method handling
Closes gh-24948
2020-04-25 16:34:59 +02:00
Juergen Hoeller 401f9599ca Caching of autowire candidate metadata for injection point matching
Closes gh-24904
2020-04-25 16:34:28 +02:00
Juergen Hoeller 0552102780 Enforce limit for storing suppressed exceptions
Closes gh-24902
2020-04-25 16:33:35 +02:00
liuhy365 3af54692fa Fix parent bean factory self-reference issue.
If set parent bean factory to self, once try to get an undefined bean,  bellow condition
if (parentBeanFactory != null && !containsBeanDefinition(beanName)) {
...
}
will always be true and  StackOverflowError will be thrown.
Sometimes, this issue is hard to detect during runtime, if self-reference is not allowed here, error will be found at the early time of startup.
Also, a self-reference parent bean factory is valueless.
2020-04-25 16:28:09 +02:00
mattbertolini 21887ad23b Allow override of data binder binding
Motivation
----------
The Spring MVC ModelAttributeMethodProcessor includes many helpful
extension methods that allow developers to extend and enhance the data
binding capabilities of the class. Unfortunately, Spring WebFlux's
equivalent class, the ModelAttributeMethodArgumentResolver, does not
include these same extension methods. I am leveraging these extension
methods, specifically the bindRequestParameters method, to provide
valuable enhancements to my application. I would like to provide these
same enhancements to the WebFlux portion of my application and am
unable to do so at this time. I would like to update the WebFlux
ModelAttributeMethodArgumentResolver to add the bindRequestParameters
method.

Modifications
-------------
I created a new method called bindRequestParameters and encapsulated
the WebExchangeDataBinder bind call inside of it. This method is
marked as protected as it should only be used by children of this
class. This change mirrors the behavior in the equivalent Spring MVC
class (ModelAttributeMethodProcessor).

Result
------
The WebFlux ModelAttributeMethodArgumentResolver can now accept
alternative data binding implementations mirroring the Web MVC
behavior.
2020-04-25 16:27:36 +02:00
Сергей Цыпанов bff1a1932f Rid pointless wrapping with BufferedInputStream from class reading 2020-04-25 16:27:01 +02:00
Sam Brannen 72b1abd226 Reintroduce synthesized annotation attribute value caching
Prior to the introduction of the MergedAnnotation API in Spring Framework
5.2, our SynthesizedAnnotationInvocationHandler utilized a cache for
annotation attribute values; whereas, the new
SynthesizedMergedAnnotationInvocationHandler has no such caching in
place.

Issues such as gh-24961 indicate a regression in performance caused by
the lack of such an attribute value cache. For example, the required
attribute in @RequestParam is looked up using the internal meta-model
in the MergedAnnotation API twice per request for each @RequestParam in
a given controller handler method.

This commit reintroduces the attribute value cache to avoid the
unnecessary performance overhead associated with multiple lookups of
the same attribute in a synthesized annotation. This applies not only
to direct attribute method invocations but also to invocations of
equals() and hashCode() on a synthesized annotation.

Note, however, that this commit does NOT address multiple lookups of
annotation attribute values for invocations of toString(). That behavior
currently remains unchanged in the implementation of
org.springframework.core.annotation.TypeMappedAnnotation.toString().

Closes gh-24970
2020-04-25 15:28:09 +02:00
rahulmlokurte 0e9da17910
Fix typo in webmvc-functional.adoc
Closes gh-24968
2020-04-25 09:24:15 +02:00