Commit Graph

2366 Commits

Author SHA1 Message Date
Sam Brannen 8fc744f4f4 Improve Javadoc for BeanExpressionResolver 2022-03-21 16:57:27 +01:00
Sam Brannen 3da7a48a17 Explicitly close ApplicationContexts and clean up warnings in tests 2022-03-20 13:19:25 +01:00
Sam Brannen 7f4e09e994 Merge branch '5.3.x'
# Conflicts:
#	spring-context/src/test/java/org/springframework/context/event/PayloadApplicationEventTests.java
#	spring-context/src/test/java/org/springframework/context/groovy/GroovyApplicationContextTests.java
#	spring-context/src/test/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryBeanTests.java
#	spring-context/src/test/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryTests.java
#	spring-context/src/test/java/org/springframework/format/datetime/joda/JodaTimeFormattingTests.java
#	spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java
#	spring-context/src/test/java/org/springframework/remoting/rmi/RmiSupportTests.java
#	spring-context/src/test/java/org/springframework/scripting/support/StandardScriptFactoryTests.java
#	spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java
#	spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutorTests.java
2022-03-20 12:55:39 +01:00
Sam Brannen 9a5891e6e6 Explicitly close ApplicationContexts and clean up warnings in tests
This commit also ensures that various test methods actually test
something now.
2022-03-20 12:34:56 +01:00
Stephane Nicoll 0cbea29517 Polish 2022-03-18 18:25:30 +01:00
Sam Brannen 2fb1dd177b Remove obsolete org.springframework.core.NestedIOException
This commit removes Spring's custom NestedIOException and replaces its
usage with the standard IOException which has supported a root cause
since Java 6.

Closes gh-28198
2022-03-18 16:56:56 +01:00
Sam Brannen b570f60560 Merge branch '5.3.x'
# Conflicts:
#	spring-aop/src/main/java/org/springframework/aop/support/AopUtils.java
#	spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationClassFilter.java
#	spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMatchingPointcut.java
#	spring-aop/src/main/java/org/springframework/aop/support/annotation/AnnotationMethodMatcher.java
#	spring-beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java
#	spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
#	spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedNotification.java
#	spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedOperationParameter.java
#	spring-core/src/main/java/org/springframework/javapoet/support/package-info.java
#	spring-core/src/main/java/org/springframework/util/TypeUtils.java
#	spring-web/src/main/java/org/springframework/http/HttpMethod.java
2022-03-18 16:47:12 +01:00
Sam Brannen 64b64d9ba0 Stop referring to features as "Java 5" features
With a Java 8 baseline in place for quite some time now, it no longer
makes sense to refer to features such as annotations as "Java 5
annotations".

This commit also removes old `Tiger*Tests` classes, thereby avoiding
duplicate execution of various tests.
2022-03-18 16:32:30 +01:00
Sam Brannen 1419172fbd Polish Javadoc for JMX support 2022-03-18 15:25:35 +01:00
Sam Brannen 4db2f8ea1b Remove obsolete Nashorn-based scripting tests
Since the Nashorn JavaScript engine was removed in Java 15, these tests
will never be run on a Java 17+ JDK which is required as of Spring
Framework 6.0.

See gh-27919
2022-03-15 16:33:52 +01:00
Stephane Nicoll 672555a568 Add support of init and destroy methods
This commit updates InitDestroyBeanPostProcessor so that it contributes
init or destroy method names to the `RootBeanDefinition`. This is then
used by the generator to provide these methods to the optimized AOT
context.

Invocation of those init methods still happen using reflection so
dedicated hints are contributed for them.

Closes gh-28151
2022-03-12 13:35:56 +01:00
izeye 2a9a1f1c3a Add Javadoc since for GenericApplicationContext.refreshForAotProcessing()
See gh-28171
2022-03-12 11:42:36 +01:00
Stephane Nicoll 9b07457d06 Introduce ApplicationContextAotGenerator
This commit introduces a way to process a GenericApplicationContext
ahead of time. Components that can contribute in that phase are
invoked, and their contributions are recorded in the
GeneratedTypeContext.

This commit also expands BeanFactoryContribution so that it can exclude
bean definitions that are no longer required.

Closes gh-28150
2022-03-09 11:17:21 +01:00
Stephane Nicoll b5695b9248 Add support for refreshing a GenericApplicationContext for AOT
This commit adds a way to refresh a GenericApplicationContext for ahead
of time processing: refreshForAotProcessing() processes the bean factory
up to a point where it is about to create bean instances.

MergedBeanDefinitionPostProcessor implementations are the only bean
post processors that are invoked during this phase.

Closes gh-28065
2022-03-09 11:17:21 +01:00
Stephane Nicoll 9ba927215e Add support for ImportAware callback
This commit adds a way for a BeanFactoryPostProcessor to participate to
AOT optimizations by contributing code that replaces its runtime
behaviour.

ConfigurationClassPostProcessor does implement this new interface and
computes a mapping of the ImportAware configuration classes. The mapping
is generated for latter reuse by ImportAwareAotBeanPostProcessor.

Closes gh-2811
2022-03-09 11:17:21 +01:00
Sam Brannen 66e9095ee9 Fix links and tests broken during merge
See gh-28083
2022-03-01 17:03:59 +01:00
Sam Brannen 466dd825ac Merge branch '5.3.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/annotation/InitDestroyAnnotationBeanPostProcessor.java
#	spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java
#	spring-beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java
#	spring-context/src/test/java/org/springframework/context/annotation/Spr3775InitDestroyLifecycleTests.java
2022-03-01 16:48:24 +01:00
Sam Brannen dcdea986f6 Polish init/destroy lifecycle method tests
See gh-28083
2022-03-01 15:43:25 +01:00
Sam Brannen a524857bd5 Fix init/destroy lifecycle method tests
See gh-28083
2022-03-01 15:23:15 +01:00
Vikey Chen af14eea1ef Introduce tests for gh-28083 2022-03-01 15:22:51 +01:00
Arjen Poutsma 65394b00ea Merge branch '5.3.x' 2022-02-24 14:50:18 +01:00
Arjen Poutsma 7e2106b850 Refactor roll forward in CronField
Before this commit, CronField.Type::rollForward added temporal units
to reach the higher order field. This caused issues with DST, where
the added amount of hours was either too small or too large.

This commit refactors the implementation so that it now adds one to the
higher order field, and reset the current field to the minimum value.

Closes gh-28095
2022-02-24 14:47:02 +01:00
Sam Brannen be8224a590 Polish contribution
See gh-27818
2022-02-19 16:04:55 +01:00
Guirong Hu 01214b3473 Allow @Async qualifier to be declared with a placeholder or SpEL expression
Closes gh-27818
2022-02-19 15:09:40 +01:00
Sam Brannen 8c6d59aaaf Polish contribution
See gh-28014
2022-02-19 14:43:26 +01:00
a.yazychyan c5c926726d Use enhanced switch expressions where feasible
Closes gh-28014
2022-02-19 14:34:05 +01:00
Juergen Hoeller 4a470e0a37 Prevent @Bean method overloading by default (with enforceUniqueMethods flag)
Closes gh-22609
2022-02-17 22:37:34 +01:00
Juergen Hoeller 41ee23345d Support for registering multiple init/destroy methods on AbstractBeanDefinition
Closes gh-28013
2022-02-17 18:14:09 +01:00
Sam Brannen c1987e5b8c Merge branch '5.3.x' 2022-02-16 12:12:37 +01:00
Sam Brannen e3ceb9b23d Polish @Target declarations for stereotype annotations 2022-02-16 12:01:14 +01:00
Arjen Poutsma 3463106532 Merge branch '5.3.x' 2022-02-16 11:24:10 +01:00
Arjen Poutsma 5ab966fbde Polish contribution
See gh-28038
2022-02-16 11:16:38 +01:00
vikey 7276752e7c Fix CronExpression issue with DST
This commit fixes an issue with CronExpression fails to calculate next
execution on the day of daylight saving time.

Closes gh-28038
2022-02-16 11:16:38 +01:00
Sam Brannen 2cee63491d Remove deprecated SocketUtils
Closes gh-28052
2022-02-15 16:19:11 +01:00
Sam Brannen 7412625929 Merge branch '5.3.x'
# Conflicts:
#	spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java
#	spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java
2022-02-15 14:35:25 +01:00
Sam Brannen 685a195ba1 Deprecate SocketUtils
SocketUtils was introduced in Spring Framework 4.0, primarily to assist
in writing integration tests which start an external server on an
available random port. However, these utilities make no guarantee about
the subsequent availability of a given port and are therefore
unreliable. Instead of using SocketUtils to find an available local
port for a server, it is recommended that users rely on a server's
ability to start on a random port that it selects or is assigned by the
operating system. To interact with that server, the user should query
the server for the port it is currently using.

SocketUtils is now deprecated in 5.3.16 and will be removed in 6.0.

Closes gh-28052
2022-02-15 14:28:58 +01:00
Juergen Hoeller 3eb9886724 Merge branch '5.3.x'
# Conflicts:
#	spring-context-support/src/main/java/org/springframework/scheduling/commonj/WorkManagerTaskExecutor.java
#	spring-core/src/main/java/org/springframework/core/task/SimpleAsyncTaskExecutor.java
#	spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java
#	spring-tx/src/main/java/org/springframework/jca/work/SimpleTaskWorkManager.java
#	spring-tx/src/main/java/org/springframework/jca/work/WorkManagerTaskExecutor.java
2022-02-04 23:24:21 +01:00
Juergen Hoeller a71a45e719 Deprecate AsyncTaskExecutor.execute(Runnable task, long startTimeout)
Closes gh-27959
2022-02-04 23:21:00 +01:00
Sam Brannen 4358b48b08 Merge branch '5.3.x' 2022-02-04 20:01:48 +01:00
Sam Brannen 5d7a632965 Ensure Spring AOP generates JDK dynamic proxies for lambdas
Prior to this commit, if AOP proxy generation was configured with
proxyTargetClass=true (which is the default behavior in recent versions
of Spring Boot), beans implemented as lambda expressions or method
references could not be proxied with CGLIB on Java 16 or higher without
specifying `--add-opens java.base/java.lang=ALL-UNNAMED`.

This commit addresses this shortcoming by ensuring that beans
implemented as lambda expressions or method references are always
proxied using a JDK dynamic proxy even if proxyTargetClass=true.

Closes gh-27971
2022-02-04 19:59:35 +01:00
Sam Brannen b3f786728e Use modern language features in tests 2022-02-03 15:35:32 +01:00
Sam Brannen 32cd73261a Apply "switch expressions" where applicable 2022-02-03 15:21:18 +01:00
Sam Brannen 54565e95b5 Merge branch '5.3.x' 2022-02-03 14:58:36 +01:00
Sam Brannen f8a5a8d7be Use modern language features in tests 2022-02-03 14:50:10 +01:00
Arjen Poutsma 6e4551131d Merge branch '5.3.x' 2022-02-01 13:52:52 +01:00
Arjen Poutsma 8f9a1cdc0c Consider current date in "1W" cron expressions
Prior to this commit, the QuartzCronField::weekdayNearestTo would elapse
until the next month before checking if the current day matched.

After this commit, the current day is checked before we elapse until
the next month.

Closes gh-27966
2022-02-01 13:51:40 +01:00
Stephane Nicoll 84e6d2a95c Merge branch '5.3.x' 2022-01-26 14:12:26 +01:00
Stephane Nicoll 6a6c7df824 Polish "Add CacheErrorHandler implementation that logs exceptions"
See gh-27826
2022-01-26 14:10:49 +01:00
Adam Ostrožlík 5c9fbcc23c Add CacheErrorHandler implementation that logs exceptions
See gh-27826
2022-01-26 14:10:49 +01:00
Sam Brannen f64cc08b62 Apply "instanceof pattern matching" in additional core classes 2022-01-26 13:49:50 +01:00
Sam Brannen 54c7f53eff Avoid use of `var` declarations
See gh-27945.
2022-01-21 19:25:44 +01:00
Sam Brannen 9af2c9d55d Overhaul GroovyBeanDefinitionReaderTests
This commit switches from CGLIB-based proxies to JDK dynamic proxies
for AOP and scoped-bean tests, in order to be able to run tests in the
Eclipse IDE without special Run Configuration setup for the Java module
system.

This commit also simplifies the loading of beans defined with the Groovy
DSL.

See gh-27945
2022-01-21 11:16:35 +01:00
Sam Brannen e94e67cd93 Polish GroovyApplicationContextTests
See gh-27945
2022-01-21 11:16:35 +01:00
Sam Brannen 1cf2960eb6 Use AssertJ instead of Groovy Assertions
See gh-27945
2022-01-21 11:16:35 +01:00
Sam Brannen a6deac3ffe Polish contribution
See gh-27945
2022-01-21 10:33:32 +01:00
Dave Syer f7c3706361 Port GroovyDynamicElementReader to Java
Prior to this commit, GroovyDynamicElementReader was implemented in
Groovy, which required that developers have Groovy language support
installed and configured in their IDEs.

This commit ports GroovyDynamicElementReader from Groovy to Java,
making the compilation much simpler and allowing developers to open the
project in Eclipse or VSCode (or other IDEs without Groovy support)
without compiler errors.

This commit also converts related tests from Groovy to Java.

Closes gh-27945
2022-01-20 17:42:17 +01:00
Sam Brannen e565d2cabb Apply "instanceof pattern matching" in PropertySourcesPlaceholderConfigurer
See gh-27947
2022-01-18 16:23:41 +01:00
Sam Brannen d72cf89ebf Make PropertySourcesPlaceholderConfigurerTests pass on JDK 17
This change is required in Eclipse IDE but not for the Gradle build.

See gh-27947
2022-01-18 16:21:26 +01:00
Sam Brannen 4a51e4bbc7 Merge branch '5.3.x' 2022-01-18 16:16:10 +01:00
Sam Brannen 5c76ff5ef6 Ensure unresolvable placeholders can be ignored with @Value
Prior to this commit, if a PropertySourcesPlaceholderConfigurer bean
was configured with its ignoreUnresolvablePlaceholders flag set to
true, unresolvable placeholders in an @Value annotation were not
ignored, resulting in a BeanCreationException for the bean using @Value.

For example, given a property declared as `my.app.var = ${var}` without
a corresponding `var` property declared, an attempt to resolve
`@Value("${my.app.var}")` resulted in the following exception.

java.lang.IllegalArgumentException: Could not resolve placeholder 'var' in value "${var}"

This commit fixes this by modifying
PropertySourcesPlaceholderConfigurer's postProcessBeanFactory(...)
method so that a local PropertyResolver is created if the
ignoreUnresolvablePlaceholders flag is set to true. The local
PropertyResolver then enforces that flag, since the Environment in the
ApplicationContext is most likely not configured with
ignoreUnresolvablePlaceholders set to true.

Closes gh-27947
2022-01-18 16:00:55 +01:00
Sam Brannen d57bc176f2 Merge branch '5.3.x' 2022-01-10 14:21:25 +01:00
Sam Brannen df263d01b9 Use idiomatic AssertJ assertions for true, false, and null 2022-01-10 14:15:55 +01:00
Marten Deinum 941b6af9ac Use Collection factory methods when applicable
This commit replaces the use of Collections.unmodifiableList/Set/Map
with the corresponding 'of(...)' factory methods introduced in Java 9.

Closes gh-27824
2022-01-04 12:01:13 +01:00
liuzhifei 7021eb5bb1 Apply "instanceof pattern matching" in additional locations
Closes gh-27696
2022-01-03 16:52:38 +01:00
Sam Brannen 6555d3b42d Suppress warnings in tests 2022-01-03 16:12:14 +01:00
Stephane Nicoll 900e0f56eb Polish "Fix typo and use of componentry"
See gh-27852
2021-12-29 11:05:27 +01:00
liuzhifei 65d2e9bb54 Fix typo and use of componentry
See gh-27852
2021-12-29 11:01:41 +01:00
Stephane Nicoll 7f73cb6726 Merge pull request #27864 from izeye
* pr/27864:
  Update copyright year of changed file
  Remove AsyncConfigurerSupport reference in EnableAsync Javadoc

Closes gh-27864
2021-12-29 10:56:40 +01:00
Stephane Nicoll 8a7a046bf0 Update copyright year of changed file
See gh-27864
2021-12-29 10:56:29 +01:00
izeye 88d4eac537 Remove AsyncConfigurerSupport reference in EnableAsync Javadoc
See gh-27864
2021-12-29 10:56:02 +01:00
Stephane Nicoll c204cc7ba0 Update copyright year of changed file
See gh-27863
2021-12-29 10:54:49 +01:00
izeye f0125afb5e Remove references to JCacheConfigurerSupport and CachingConfigurerSupport
See gh-27863
2021-12-29 10:53:56 +01:00
Stephane Nicoll 772630caf1 Polish "Add Javadoc since to new PayloadApplicationEvent constructor"
See gh-27848
2021-12-27 12:15:27 +01:00
izeye f3fd7b156e Add Javadoc since to new PayloadApplicationEvent constructor
See gh-27848
2021-12-27 12:14:44 +01:00
izeye 713795cc34 Polish
See gh-27827
2021-12-21 09:36:08 +01:00
Juergen Hoeller 9dc5c9f935 Merge branch '5.3.x'
# Conflicts:
#	build.gradle
2021-12-15 21:52:16 +01:00
Juergen Hoeller d665977787 Polishing 2021-12-15 21:50:30 +01:00
Juergen Hoeller 96e2fc69ed Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-core/src/main/java/org/springframework/core/type/StandardAnnotationMetadata.java
#	spring-core/src/main/java/org/springframework/core/type/classreading/SimpleAnnotationMetadata.java
2021-12-15 18:03:51 +01:00
Juergen Hoeller 1885ab3e07 Polishing 2021-12-15 17:58:28 +01:00
Stephane Nicoll 2f3a9dbc68 Deprecate CachingConfigurerSupport and AsyncConfigurerSupport
Closes gh-27813
2021-12-15 12:03:39 +01:00
Stephane Nicoll b6faaf1fc1 Merge branch '5.3.x' 2021-12-15 10:59:50 +01:00
Stephane Nicoll de10bb69cb Stop resolving AsyncConfigurer instances eagerly
Closes gh-27808
2021-12-15 10:53:09 +01:00
Stephane Nicoll c7642422c3 Stop resolving CachingConfigurer instances eagerly
Closes gh-27751
2021-12-15 10:52:09 +01:00
Juergen Hoeller 3e6eb987d0 Clean up 5.3.x merge result
See gh-27726
2021-12-14 17:01:17 +01:00
Juergen Hoeller bfdb93b406 Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	src/docs/asciidoc/integration.adoc
2021-12-14 16:51:00 +01:00
Juergen Hoeller 4b7d9b1f9c Avoid compilation warning for test class with serializable base class 2021-12-14 16:48:07 +01:00
Juergen Hoeller ca84559588 Provide findAnnotationOnBean variant with allowFactoryBeanInit flag
Closes gh-27796
2021-12-14 16:47:12 +01:00
Juergen Hoeller d7b9270672 Clarify SchedulerFactoryBean's LocalDataSourceJobStore overriding
Includes clarification of interface-level cache annotations for target-class proxies.

Closes gh-27709
See gh-27726
2021-12-14 16:46:13 +01:00
Juergen Hoeller c44447f622 Avoid early initialization of empty interceptor names
Closes gh-12238
2021-12-14 16:46:01 +01:00
Brian Clozel bb53a99def Upgrade to Kotlin 1.6.10
Closes gh-27413
2021-12-14 15:25:50 +01:00
Stephane Nicoll 8d93dc4abb Merge branch '5.3.x' 2021-12-14 14:05:18 +01:00
Stephane Nicoll b06d267232 Remove references to AsyncConfigurerSupport
Closes gh-27812
2021-12-14 13:59:05 +01:00
Kwangyong Kim ceea00f733 Fix cache annotation tip
Even if using cglib proxy mode, annotations on an interface can be recognized.

Signed-off-by: Kwangyong Kim <banana.yong@gmail.com>
2021-12-14 13:51:20 +01:00
Stephane Nicoll 8422d9d22f Add default methods to CachingConfigurer
This commit adds default methods to CachingConfigurer and
JCacheConfigurer and removes the reference to their respective support
classes as they are now irrelevant.

Closes gh-27811
2021-12-14 13:49:57 +01:00
Juergen Hoeller 37bebeaaaf Accept protected @Transactional/Cacheable methods on CGLIB proxies
Closes gh-25582
2021-12-14 09:41:23 +01:00
Yanming Zhou d836fb4a7a Remove unnecessary @SuppressWarnings
See gh-27807
2021-12-13 09:34:22 +01:00
Juergen Hoeller 7f43128a0e Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-web/src/main/java/org/springframework/web/server/MediaTypeNotSupportedStatusException.java
#	spring-web/src/main/java/org/springframework/web/util/ContentCachingRequestWrapper.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java
2021-12-03 22:42:05 +01:00
Juergen Hoeller 14f24f43d7 Polishing 2021-12-03 22:36:31 +01:00
Stephane Nicoll 110e0f7f2b Add support for Instant in @DateTimeFormat
Closes gh-19846
2021-12-03 16:17:52 +01:00
Stephane Nicoll a57ea39707 Polish "Add support for YearMonth and MonthDay in @DateTimeFormat"
See gh-1215
2021-12-03 11:20:04 +01:00
Kazuki Shimizu 65eceafeee Add support for YearMonth and MonthDay in @DateTimeFormat
See gh-1215
2021-12-03 10:59:38 +01:00
Stephane Nicoll 65dc2afe9d Polish "Add Kotlin extensions for Cache and CacheManager"
See gh-23927
2021-12-02 14:51:29 +01:00
sokomishalov 5ec1e20242 Add Kotlin extensions for Cache and CacheManager
See gh-23927
2021-12-02 14:51:29 +01:00
Stephane Nicoll 792b366bda Polish "Add support for explicit generic type in PayloadApplicationEvent"
See gh-24599
2021-12-02 10:20:08 +01:00
陈其苗 6283456ef2 Add support for explicit generic type in PayloadApplicationEvent
See gh-24599
2021-12-02 09:38:48 +01:00
김보배(Bobae Kim)/Platform Engineering팀/11ST 804b343cab Use parseInt without substring method 2021-11-25 16:14:59 +01:00
Brian Clozel 79d3f5c64c Merge branch '5.3.x' 2021-11-24 21:34:55 +01:00
Brian Clozel d019c1f82b Polish
See gh-2030
2021-11-24 21:34:23 +01:00
Stephane Nicoll 51ecbdecd8 Merge branch '5.3.x' 2021-11-24 16:29:52 +01:00
Stephane Nicoll a1b2695c3a Polish "Clarify behaviour of AnnotationBeanNameGenerator with acronyms"
See gh-2030
2021-11-24 16:29:13 +01:00
Mateusz 341f4882ed Clarify behaviour of AnnotationBeanNameGenerator with acronyms
Name transformation is delegated to Introspector#decapitalize, which
states "but in the (unusual) special case when there is more than one
character and both the first and second characters are upper case, we
leave it alone.". This commit clarifies this behavior.

See gh-2030
2021-11-24 16:00:22 +01:00
Rossen Stoyanchev dcc342ccc5 Merge branch '5.3.x' into main 2021-11-24 13:14:55 +00:00
Rossen Stoyanchev 3f7dec0b0d Polishing contribution
Closes gh-699
2021-11-24 13:05:05 +00:00
Marco Krikke 830cc3450f Improved DataBinder Javadoc for xxx*yyy pattern matching
The default documentation does not mention xxx*yyy pattern matching,
which is, however, supported by PatternMatchUtils. Such a pattern
can be useful for matching nested properties in all elements of a
collection, e.g. property[*].nestedProperty.

See gh-699
2021-11-24 13:05:05 +00:00
Stephane Nicoll d5f36c7e2c Merge branch '5.3.x' 2021-11-24 14:02:57 +01:00
Stephane Nicoll 19a8b94b21 Polish "Expose prestartAllCoreThreads on ExecutorService"
See gh-1246
2021-11-23 17:17:22 +01:00
Federico Donnarumma 2c53e9e308 Expose prestartAllCoreThreads on ExecutorService
See gh-1246
2021-11-23 16:14:39 +01:00
Juergen Hoeller 4750a9430c Early removal of 5.x-deprecated code
Closes gh-27686
2021-11-18 09:18:06 +01:00
Juergen Hoeller 54bd66755c Consistently replace String encoding names with StandardCharset arguments
Closes gh-27664
2021-11-10 15:19:51 +01:00
Juergen Hoeller 0e1ba7aae5 Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-context/src/main/java/org/springframework/context/annotation/Lazy.java
2021-11-09 22:39:58 +01:00
Juergen Hoeller b167e1a93f Remove unnecessary final declarations (for consistency) 2021-11-09 22:35:24 +01:00
Juergen Hoeller 9bc09631d6 Recommend ObjectProvider as alternative to @Lazy for optional dependencies
Closes gh-27649
2021-11-09 22:29:56 +01:00
Sam Brannen ebfec822cb Merge branch '5.3.x' 2021-11-05 10:33:54 +01:00
Sam Brannen ff1485fd8d Fix log message formatting in CandidateComponentsIndexLoader 2021-11-05 10:31:10 +01:00
Sam Brannen 32c14a2b42 Update Javadoc regarding repeatable annotation support 2021-10-29 11:04:01 +02:00
Stephane Nicoll 5ea1cf532e Merge branch '5.3.x' 2021-10-28 14:21:53 +02:00
Stephane Nicoll f295c8b2fb Polish "Add support for custom expression parsing"
See gh-27604
2021-10-28 14:20:15 +02:00
Xjzon 40d84c297b Add support for custom expression parsing
See gh-27604
2021-10-28 13:57:15 +02:00
Sam Brannen c989470f94 Remove unused code in FormattingConversionServiceTests
This commit removes test code that became obsolete with the removal of
Joda Time support.
2021-10-25 17:12:55 +02:00
Sam Brannen 267df1c0f2 Merge branch '5.3.x' 2021-10-25 17:07:29 +02:00
Sam Brannen c4c3d59d07 Remove unused code in FormattingConversionServiceTests 2021-10-25 17:02:58 +02:00
Sam Brannen e4e667acdb Polishing 2021-10-23 18:02:55 +02:00
Sam Brannen 63509e64d4 Merge branch '5.3.x' 2021-10-23 17:47:55 +02:00
Kenzo Spaulding 4ec8ae42f4 Add test cases to SpEL's MapAccessorTests
Closes gh-26981
2021-10-23 17:45:37 +02:00
Sam Brannen 71036e7da5 Merge branch '5.3.x' 2021-10-21 14:16:24 +02:00
Sam Brannen 7a54ff2d21 Extract public TypeFilterUtils from ComponentScanAnnotationParser
Prior to this commit, third parties using @ComponentScan's @Filter
annotation had to implement their own parsing for @Filter
AnnotationAttributes as well as instantiation of the corresponding
TypeFilters. In such cases the various *Aware callbacks
(BeanFactoryAware, EnvironmentAware, etc.) should also be supported.

This commit therefore extracts a new public TypeFilterUtils class from
ComponentScanAnnotationParser so that third parties can benefit from
consistent TypeFilter creation from @ComponentScan @Filter annotations.

Closes gh-27553
2021-10-21 14:15:38 +02:00
Sam Brannen 67333a3f94 Apply "instanceof pattern matching" Eclipse clean-up in spring-context
This commit also applies additional clean-up tasks such as the following.

- final fields
- diamond operator (<>) for anonymous inner classes
- Comparator.comparing
- convert to switch expression

This has only been applied to `src/main/java`.
2021-10-14 17:33:53 +02:00
Juergen Hoeller da457abd5b Merge branch '5.3.x' 2021-10-12 15:19:40 +02:00
Juergen Hoeller e4934a90eb Use TriggerContext's Clock instead of new Date()
Closes gh-27546
2021-10-12 15:17:18 +02:00
Juergen Hoeller 715f300fa1 Avoid expensive isReadable() check during classpath scan
Closes gh-25741
See gh-21372
2021-10-12 15:15:51 +02:00
Sam Brannen 87cb84b832 Merge branch '5.3.x' 2021-10-12 12:27:55 +02:00
Sam Brannen 5bd90538b3 Introduce test for gh-27499 and polish contribution 2021-10-12 12:22:24 +02:00
Nick 50ccb1bfcd Avoid duplicate JCacheOperationSource bean registration in <cache:annotation-driven />
In our application we use XML context and <cache:annotation-driven />
declaration. Also we disable bean definition duplication by setting
GenericApplicationContext.setAllowBeanDefinitionOverriding(false) in an
ApplicationContextInitializer. This combination leads to a
BeanDefinitionOverrideException because the
DefaultJCacheOperationSource bean is registered twice.

 - once for: parserContext.getReaderContext().registerWithGeneratedName(sourceDef);
 - once for: parserContext.registerBeanComponent(new BeanComponentDefinition(sourceDef, sourceName));

This commit refactors JCacheCachingConfigurer.registerCacheAspect(...)
so that the JCacheOperationSource bean is registered only once.

Closes gh-27499
2021-10-12 12:05:30 +02:00
Sam Brannen 2d1e0d5e38 Merge branch '5.3.x' 2021-10-06 12:13:21 +02:00
Sam Brannen 41ae9632d1 Upgrade to Checkstyle 9.0 and spring-javaformat 0.0.29
This commit upgrades the Gradle build to use Checkstyle 9.0 and
spring-javaformat 0.0.29 (which internally uses Checkstyle 8.45.1).

Closes gh-27520
2021-10-06 12:11:19 +02:00
Sam Brannen 381b7d035a Merge branch '5.3.x' 2021-10-05 14:55:22 +02:00
Sam Brannen 48a507a993 Clean up warnings 2021-10-05 14:35:32 +02:00
Juergen Hoeller e314a79fb0 Merge branch '5.3.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java
2021-10-01 13:29:46 +02:00
Juergen Hoeller f632165dec Invoke bean-derived (Auto)Closeable.close() method directly
Closes gh-27504
2021-10-01 13:26:25 +02:00
Sam Brannen 030ba52805 Merge branch '5.3.x' 2021-09-29 16:56:33 +02:00