Commit Graph

2425 Commits

Author SHA1 Message Date
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
Sam Brannen 96e4d3a530 Fail Gradle build for Javadoc warnings
In order to catch Javadoc errors in the build, we now enable the
`Xwerror` flag for the `javadoc` tool. In addition, we now use
`Xdoclint:syntax` instead of `Xdoclint:none` in order to validate
syntax within our Javadoc.

This commit fixes all resulting Javadoc errors and warnings.

This commit also upgrades to Undertow 2.2.12.Final and fixes the
artifact names for exclusions for the Servlet and annotations APIs.

The incorrect exclusion of the Servlet API resulted in the Servlet API
being on the classpath twice for the javadoc task, which resulted in the
following warnings in previous builds.

javadoc: warning - Multiple sources of package comments found for package "javax.servlet"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.http"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.descriptor"
javadoc: warning - Multiple sources of package comments found for package "javax.servlet.annotation"

Closes gh-27480
2021-09-29 14:02:37 +02:00
Juergen Hoeller f32f04d841 Code cleanup on new baseline 2021-09-28 19:02:44 +02:00
Juergen Hoeller 4d7fa9a632 Merge branch '5.3.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
2021-09-28 18:18:23 +02:00
Juergen Hoeller 86b010a6b2 Defensive reference to JNDI API for JDK 9+ (optional `java.naming` module)
Closes gh-27483
2021-09-28 18:15:22 +02:00
Sam Brannen 08bce08018 Use text blocks with JUnit Jupiter 5.8.1
See gh-27450
2021-09-28 14:20:31 +02:00
Sam Brannen 93efb20a53 Fix broken links in Javadoc
This commit removes several links that were broken due to the removal
of various APIs in 6.0.

See gh-27480
2021-09-28 13:34:33 +02:00
Sam Brannen 3dc84c2d92 Merge branch '5.3.x' 2021-09-28 11:48:50 +02:00
Sam Brannen bfdc99ab79 Fix Javadoc errors
See gh-27480
2021-09-28 11:44:12 +02:00
Sam Brannen 16bf39ea1b Merge branch '5.3.x' 2021-09-28 10:35:18 +02:00
Sam Brannen 2567b20949 Upgrade to spring-javaformat 0.0.28 and downgrade to Checkstyle 8.41
In order to be able to use text blocks and other new Java language
features, we are upgrading to a recent version of Checkstyle.

The latest version of spring-javaformat-checkstyle (0.0.28) is built
against Checkstyle 8.32 which does not include support for language
features such as text blocks. Support for text blocks was added in
Checkstyle 8.36.

In addition, there is a binary compatibility issue between
spring-javaformat-checkstyle 0.0.28 and Checkstyle 8.42. Thus we cannot
use Checkstyle 8.42 or higher.

In this commit, we therefore upgrade to spring-javaformat-checkstyle
0.0.28 and downgrade to Checkstyle 8.41.

This change is being applied to `5.3.x` as well as `main` in order to
benefit from the enhanced checking provided in more recent versions of
Checkstyle.

Closes gh-27481
2021-09-28 10:29:31 +02:00
Juergen Hoeller 8f96ca4a2d Merge branch '5.3.x'
# Conflicts:
#	spring-context/spring-context.gradle
#	spring-core/src/main/java/org/springframework/core/ReactiveAdapterRegistry.java
2021-09-21 17:47:27 +02:00
Juergen Hoeller 1f8c233dfc Polishing 2021-09-21 17:43:03 +02:00
Juergen Hoeller 0dc5d2794f Avoid early ConversionService determination in StandardBeanExpressionResolver
Closes gh-27446
2021-09-21 17:42:50 +02:00
Juergen Hoeller 774583dfa7 Retain support for legacy PostConstruct/PreDestroy/Inject variants
Also removes JAX-WS support from CommonAnnotationBeanPostProcessor.

Closes gh-27444
See gh-27422
2021-09-21 17:07:42 +02:00
Juergen Hoeller d84ca2ba90 Jakarta EE 9 migration
Upgrades many dependency declarations; removes old EJB 2.x support and outdated Servlet-based integrations (Commons FileUpload, FreeMarker JSP support, Tiles).

Closes gh-22093
Closes gh-25354
Closes gh-26185
Closes gh-27423
See gh-27424
2021-09-17 09:14:07 +02:00
Juergen Hoeller 5822f1bf85 Drop RPC-style remoting
Closes gh-27422
2021-09-17 08:59:58 +02:00
Juergen Hoeller b7b078d26e Remove Joda-Time support
Closes gh-27426
2021-09-17 08:58:40 +02:00
Juergen Hoeller cf2429b0f0 Remove support for deprecated Java SecurityManager (-> JDK 17 build compatibility)
Includes hard JDK 9+ API dependency in CGLIB ReflectUtils (Lookup.defineClass) and removal of OutputStream spy proxy usage (avoiding invalid Mockito proxy on JDK 17)

Closes gh-26901
2021-09-15 15:30:25 +02:00
Brian Clozel cecc0849a8 Upgrade to Gradle 7.2
This commit upgrades Gradle to 7.2.
Gradle configuration names are updated accordingly.
This also upgrades Gradle build plugins.

See gh-26870
2021-09-13 09:37:35 +02:00
Sam Brannen ae56f2ac09 Polish contribution
See gh-27336
2021-08-30 16:54:16 +02:00
Philippe Marschall debf61b948
Remove unused private loggers
Closes gh-27336
2021-08-30 16:51:59 +02:00
Sam Brannen c27ec00ae9 Polish scheduling Javadoc 2021-08-26 14:09:23 +02:00
Sam Brannen 9a7fb7022d Fix typo in @Scheduled
See gh-27309
2021-08-26 13:43:48 +02:00
Sam Brannen bd72e4498b Revise and document TimeUnit support in @Scheduled
This commit also fixes a bug introduced in commit e99b43b91e, where
java.time.Duration strings were converted to milliseconds and then
converted again using the configured TimeUnit.

See gh-27309
2021-08-25 20:55:55 +02:00
Axzial e99b43b91e Support TimeUnit in the @Scheduled annotation
This commit introduces a new `timeUnit` attribute in the @Scheduled
annotation to allow the user to specify a time unit other than
milliseconds.

Closes gh-27309
2021-08-25 20:50:37 +02:00
Syuziko eaf9deedfd Polish tests
See gh-27248
2021-08-07 18:53:47 +02:00
Sam Brannen 161c9dc3bd Improve @Cacheable documentation regarding java.util.Optional
This commit improves the documentation for @Cacheable to point out that
`null` will be stored in the cache for an empty `Optional` return value.

Closes gh-27184
2021-07-27 15:05:43 +02:00
Juergen Hoeller 62e916534f Introduce remaining policy setters from ScheduledThreadPoolExecutor
Closes gh-26719
2021-07-13 09:27:48 +02:00
Juergen Hoeller d3b1c4f62b Code alignment between ThreadPoolTaskExecutor and ThreadPoolTaskScheduler
See gh-26700
2021-07-09 15:19:25 +02:00
Filip Hrisafov 531174258c Apply dynamic changes in ThreadPoolTaskExecutor before setting local value
If the ThreadPoolTaskExecutor is dynamically changed with an invalid value
the state of the ThreadPoolTaskExecutor does no longer correctly represent
the state of the underlying ThreadPoolExecutor
2021-07-09 15:10:55 +02:00
Juergen Hoeller 8680fdb8bc Polishing 2021-07-09 13:26:46 +02:00
Juergen Hoeller c45c46dad7 Make proxyTargetClass=true with introduction advice work for JDK proxy targets
Closes gh-27044
2021-07-09 13:23:04 +02:00
Arjen Poutsma 76b1c0f1fc Various bug fixes in CronExpression
This commit makes various bug fixes in CronExpression and related files.

Closes gh-27136
2021-07-07 10:56:07 +02:00
Stephane Nicoll b0f724a597 Update copyright year of changed file
See gh-27105
2021-06-29 19:27:57 +02:00
takumi34 9add04f800 Fix typo in BeanDefinitionDsl.kt
See gh-27105
2021-06-29 19:27:29 +02:00
Sam Brannen a2ef6badc4 Use StringBuilder.append(char) where possible
To slightly improve performance, this commit switches to
StringBuilder.append(char) instead of StringBuilder.append(String)
whenever we append a single character to a StringBuilder.

Closes gh-27098
2021-06-25 10:44:28 +02:00
Sam Brannen 2bc7a3aa0a Implement equals, hashCode, & toString in BeanMethod and *Metadata types
Prior to this commit, ConfigurationClass implemented equals(),
hashCode(), and toString(), but BeanMethod did not.

This commit introduces equals(), hashCode(), and toString()
implementations in BeanMethod for consistency with ConfigurationClass
to make it possible to use BeanMethod instances to index additional
metadata as well.

In order to properly implement equals() in BeanMethod, the method
argument types are required, but these are not directly available in
BeanMethod. However, they are available via ASM when processing @Bean
methods. This commit therefore implements equals(), hashCode(), and
toString() in SimpleMethodMetadata which BeanMethod delegates to.

For completeness, this commit also implements equals(), hashCode(), and
toString() in StandardClassMetadata, StandardMethodMetadata, and
SimpleAnnotationMetadata.

Closes gh-27076
2021-06-24 16:41:28 +02:00
Sam Brannen 1bc236785c Polishing 2021-06-24 15:47:24 +02:00
Sam Brannen d469f6215d Polishing 2021-06-22 19:54:05 +02:00
Sam Brannen a8102e6a41 Delete unused code in ConfigurationMethod 2021-06-21 18:31:43 +02:00
duan847 3c8074b669
Fix assertion in XmlBeanFactoryTests
Closes gh-27058
2021-06-14 18:49:55 +02:00
Juergen Hoeller 23f396a231 Nullability refinements 2021-06-08 14:23:06 +02:00
Arjen Poutsma 6f2fe5ddcb (Re)introduce CronExpression::isValidExpression
This commit introduces CronExpression::isValidExpression, which was also
present on the deprecated CronSequenceGenerator.

Closes: gh-26996
2021-05-31 14:28:55 +02:00
Arjen Poutsma 4203e90655 Fix CronExpression roll-forward issue
This commit makes sure that BitsCronField rolls the date forward in
cases where we cannot find a next bit to elapse to.

Closes: gh-26964
2021-05-26 16:46:15 +02:00
Sam Brannen 1e2e114e3c Polish contribution
See gh-26871
2021-05-26 14:46:32 +02:00
Michael Edwards 0e73213144
Add ApplicationEvent constructor for specifying timestamp
Closes gh-26871
2021-05-26 14:32:41 +02:00
Sam Brannen 1e1045ba42 Doc tx semantics for @TransactionalEventListener after completion phases
This commit improves the Javadoc regarding transactional semantics for
@TransactionalEventListener methods invoked in the AFTER_COMMIT,
AFTER_ROLLBACK, or AFTER_COMPLETION phase. Specifically, the
documentation now points out that interactions with the underlying
transactional resource will not be committed in those phases.

Closes gh-26974
2021-05-26 14:21:08 +02:00
Sam Brannen 1acd832759 Fix link in @EventListener's `id` Javadoc 2021-05-16 15:08:33 +02:00
Juergen Hoeller 1469bdbc70 Nullability refinements and related polishing 2021-05-11 16:50:19 +02:00
Juergen Hoeller 90af2d5794 Log delegate service initialization at debug level (instead of info)
Closes gh-26810
2021-05-11 15:46:41 +02:00
Sam Brannen 7316dc726a Polish Javadoc for MessageSourceSupport
See gh-26874
2021-04-29 17:49:29 +02:00
Sviatoslav Hryb 118c7f969b
Improve readability of MessageSourceSupport Javadoc
Closes gh-26874
2021-04-29 17:42:41 +02:00
Johnny Lim 98770b15e7
Polishing
Closes gh-26878
2021-04-29 16:53:53 +02:00
Stephane Nicoll 607d918340 Provide nested cause when a suitable CacheManager cannot be found
Closes gh-25250
2021-04-29 08:48:34 +02:00
Christoph Dreis e7cbe23771 Avoid exceptions when evaluating validation hints
Prior to this commit, evaluating validation hints for
@javax.validation.Valid caused exceptions being raised when getting the
value of this annotation, which does not exist. Bypassing
AnnotationUtils.getValue() in those cases can improve performance by
avoiding the cost incurred by raising exceptions.

See gh-26787
2021-04-22 11:19:30 +02:00
Arjen Poutsma 27bfcbbc82 Fix daylight saving issue in CronExpression
Closes gh-26830
2021-04-21 12:04:21 +02:00
Sam Brannen 71158f4d96 Polishing
See gh-26825
2021-04-20 18:56:18 +02:00
Sviatoslav Hryb 7303680369
Remove reference to deprecated Joda Time support in @DateTimeFormat Javadoc
Closes gh-26825
2021-04-20 18:54:34 +02:00
Sam Brannen 906a1f561a Polish CronTriggerTests and assess daylight savings time issue
This test polishes CronTriggerTests and modifies the
daylightSavingMissingHour() test to help analyze why the test fails
for CET if the minute value for the last completion time falls between
0 and 9 minutes.

Associated broken build:

https://ge.spring.io/s/epphj7vruwcn6/tests/:spring-context:test/org.springframework.scheduling.support.CronTriggerTests/testDaylightSavingMissingHour(LocalDateTime,%20TimeZone)%5B2%5D?expanded-stacktrace=WyIwIl0
2021-04-20 12:18:01 +02:00
Sam Brannen e489706f13 Ensure @DateTimeFormat tests pass on Java 9+
Prior to this commit, two tests for exception handling regarding
@DateTimeFormat processing only passed on Java 8. This is due to the
fact that the toString() implementation for annotations changed in Java
9. Specifically, the representation for arrays changed from [] to {},
and strings are enclosed in double quotes beginning with Java 9.

This commit ensures that the affected @DateTimeFormat tests pass on
Java 9+, by making the assertions more lenient regarding toString()
output for annotations.

See gh-26777
See gh-26804
2021-04-18 15:48:00 +02:00
Sam Brannen 0f31830ae2 Retain root cause for parsing patterns in @DateTimeFormat
The support for fallback parsing patterns in @DateTimeFormat introduced
in gh-20292 introduced a regression in that the original cause of the
parsing exception was no longer retained.

gh-26777 addressed that regression for `java.time` support; whereas,
this commit addresses that regression for legacy Date types.

This commit ensures that the original ParseException is set as the
cause for any newly created ParseException, thereby retaining the
original exception as the root cause.

Closes gh-26804
2021-04-16 19:14:41 +02:00
Sam Brannen 22d9012081 Retain root cause for parsing patterns in @DateTimeFormat
The support for fallback parsing patterns in @DateTimeFormat introduced
in gh-20292 introduced a regression in that the original cause of the
parsing exception was no longer retained.

This commit ensures that the original DateTimeParseException is set as
the cause for any newly created DateTimeParseException, thereby
retaining the original exception as the root cause.

Closes gh-26777
2021-04-12 19:55:43 +02:00
Arjen Poutsma f982fd99d7 Fix timezone offset in CronExpressionTests
Closes gh-26744
2021-03-30 16:37:26 +02:00
Arjen Poutsma ab18ab6025 Fix CronExpression issue with ZonedDateTime & DST
This commit fixes an issue with CronExpression when used in combination
with ZonedDateTime and daylight saving time.

Closes gh-26744
2021-03-30 15:20:59 +02:00
Sam Brannen b2bcb0f93a Support multiple parsing patterns in @DateTimeFormat
Prior to this commit, @DateTimeFormat only supported a single format
for parsing date time values via the style, iso, and pattern attributes.

This commit introduces a new fallbackPatterns attribute that can be
used to configure multiple fallback patterns for parsing date time
values. This allows applications to accept multiple input formats for
date time values.

For example, if you wish to use the ISO date format for parsing and
printing but allow for lenient parsing of user input for various
additional date formats, you could annotate a field or method parameter
with configuration similar to the following.

    @DateTimeFormat(
        iso = ISO.DATE,
        fallbackPatterns = { "M/d/yy", "dd.MM.yyyy" }
    )

Closes gh-20292
2021-03-11 11:30:30 +01:00
Juergen Hoeller 3c9bd3177e Move getListenerId method to Smart/GenericApplicationListener
See gh-26638
2021-03-09 12:30:52 +01:00
Stephane Nicoll d308985edc Polish "Update reference to deprecated CronSequenceGenerator"
See gh-26651
2021-03-09 08:14:22 +01:00
Michel ten Voorde 5aef87f120 Update reference to deprecated CronSequenceGenerator
See gh-26651
2021-03-09 08:10:52 +01:00
Juergen Hoeller 48688b7b04 Pass getListenerId call on to delegate
See gh-26638
2021-03-08 23:45:47 +01:00
Juergen Hoeller 86902d27b2 Expose id/getListenerId in base EventListener/ApplicationListener (pulled up from tx)
Includes removeApplicationListeners(Predicate) method in ApplicationEventMulticaster.

Closes gh-26638
2021-03-08 19:31:56 +01:00
Arjen Poutsma eb68e6a62a Support SUN as minimum of range in CronExpression
This commit makes sure that SUN can be used at the beginning of a range,
 like SUN-FRI.

Closes gh-26598
2021-02-25 10:50:34 +01:00
Sam Brannen 262b7d7c27 Polishing 2021-02-24 17:14:10 +01:00
Sam Brannen 31d9f31806 Polish Javadoc for @DateTimeFormat 2021-02-24 11:38:07 +01:00
Brian Clozel 77a658f51b Fix registration of ApplicationStartupAware
Closes gh-26576
2021-02-23 11:45:53 +01:00
Sam Brannen db5be44ff4 Polishing 2021-02-22 17:02:17 +01:00
Sam Brannen 313e754a84 Support load-time weaving for @Component classes again
Since Spring Framework 5.2, the LoadTimeWeaver no longer weaves bean
classes annotated with @Component. This is a regression caused by the
changes in 40c62139ae, stemming from the fact that any class annotated
or meta-annotated with @Component is considered to be a candidate
configuration class in 'configuration lite' mode (i.e., a class without
the @Configuration annotation and without any @Bean methods) and
therefore now has its class eagerly loaded. This results in the class
being loaded before the LoadTimeWeaver has a chance to weave it.

This commit fixes this regression by explicitly avoiding eager class
loading for any 'lite' @Configuration or @Component class without @Bean
methods.

Closes gh-26199
2021-02-22 09:59:22 +01:00
Sam Brannen 207ee9e307 Polishing 2021-02-21 19:14:05 +01:00
Sam Brannen fd49c8f598 Polishing 2021-02-16 16:54:49 +01:00
Sébastien Deleuze 3524401bf1 Introduce a NativeDetector utility class
With the introduction of the -H:+InlineBeforeAnalysis native image
compiler flag in GraalVM 21.0.0, it is now possible to use an utility method and get code
removal at build time.

This flag will be enabled as of Spring Native 0.9.0.

closes gh-25795
2021-02-15 16:36:23 +01:00
Juergen Hoeller 3baa44c5ef Polishing 2021-02-14 18:53:53 +01:00
Juergen Hoeller df977a2fd2 Nullability refinements and related polishing 2021-02-14 17:57:32 +01:00
Juergen Hoeller defc2466b0 Fail early FactoryBean instantiation for LinkageError
Closes gh-26425
2021-02-14 17:56:38 +01:00
fengyuanwei a991c23db5 Close mapping streams after the ValidatorFactory has been built 2021-02-14 17:29:08 +01:00
Sam Brannen 03f1b65084 Polish Javadoc for ResourceLoader APIs 2021-01-26 12:20:28 +01:00
Sam Brannen 9d8910d869 Improve inline documentation for PostProcessorRegistrationDelegate
This commit introduces warnings in invokeBeanFactoryPostProcessors()
and registerBeanPostProcessors() to deter people from submitting PRs
that result in breaking changes.

Closes gh-26401
2021-01-22 13:34:29 +01:00
Stephane Nicoll 4779323d33 Clarify behaviour of condition attribute of CachePut
Closes gh-26186
2021-01-19 15:14:26 +01:00
Arjen Poutsma 67112b211a Rollback to midnight in quartz expressions
This commit makes sure that the CronExpression rolls back the time to
midnight when dealing with Quartz expression fields (such as "L", "LW",
etc.).

Closes gh-26390
2021-01-19 15:06:40 +01:00
Juergen Hoeller 799885fd6d Introduce public defineClass variant for SmartClassLoader implementations
Closes gh-26403
2021-01-19 12:03:18 +01:00
Juergen Hoeller 4ac27e4dab Suppress ClassCastException for payload type mismatch as well
Closes gh-26349
2021-01-11 09:44:38 +01:00
Arjen Poutsma d387d9ae1e Allow quartz expression in cron expression lists
This commit introduces support for lists of quartz cron fields, such
as "1L, LW" or "TUE#1, TUE#3, TUE#5".

Closes gh-26289
2021-01-07 14:27:07 +01:00
Arjen Poutsma 4f6d26b25c Parse list with range delta in CronExpression
Closes gh-26313
2021-01-04 16:02:28 +01:00
Sam Brannen 91a6254187 Test status quo for repeatable @PropertySource on composed annotation
This commit introduces tests that verify support for using
@PropertySource as a repeatable annotation without the
@PropertySources container, both locally on an @Configuration class
and on a custom composed annotation.

See gh-26329
2021-01-02 16:21:53 +01:00
Sam Brannen c8ad762b40 Polishing 2021-01-02 16:21:53 +01:00
Sam Brannen 5c1176786c Test status quo for list support in CronExpression
See gh-26289
2020-12-30 14:38:58 +01:00
Juergen Hoeller 00b56c026a Consistent handling of NullBean instances in resolveNamedBean
Closes gh-26271
2020-12-16 22:27:41 +01:00
Sébastien Deleuze e87e03c539 Refine ConfigurationClassPostProcessor behavior in native images
This commit refines ConfigurationClassPostProcessor behavior in
native images by skipping configuration classes enhancement
instead of raising an error.

See spring-projects-experimental/spring-graalvm-native#248 for
more details.

Closes gh-26236
2020-12-08 00:12:02 +01:00
Juergen Hoeller c970c318f4 Polishing 2020-12-07 22:08:01 +01:00
Brian Clozel 4337d8465c Remove spring.event.invoke-listener startup event
Prior to this commit, the `SimpleApplicationEventMulticaster` would be
instrumented with the `ApplicationStartup` and start/stop events for
invoking event listeners (`spring.event.invoke-listener`).

This feature was already limited to single-threaded event publishers,
but is still flawed since several types of events can happen
concurrently. Due to the single-threaded nature of the startup sequence,
our implementation should not produce startup events concurrently.

This can cause issues like gh-26057, where concurrent events lead to
inconcistencies when tracking parent/child relationships.

This commit removes the `spring.event.invoke-listener` startup event as
a result.

Fixes gh-26057
2020-12-03 15:40:31 +01:00
Johnny Lim c7f2f50c15
Polish ConfigurationClassPostProcessorTests
Closes gh-26197
2020-12-02 15:07:15 +01:00
Juergen Hoeller 56dbe06d9b Register @Bean definitions as dependent on containing configuration class
Closes gh-26167
2020-11-27 17:00:16 +01:00
Juergen Hoeller 86f9716fef Remove misleading default note on ISO.DATE_TIME
Closes gh-26134
2020-11-25 11:35:06 +01:00
Сергей Цыпанов e1f51b4bf8 Avoid multiple volatile reads/writes in a row where only one is enough 2020-11-05 12:25:24 +01:00
Juergen Hoeller 412aa06d86 Reliably refresh metadata for dynamically changing prototype bean class
Closes gh-26019
2020-11-04 16:48:54 +01:00
Juergen Hoeller d5b3e65718 Add since tag
See gh-26025
2020-11-04 16:46:44 +01:00
Erik van Paassen fbf8e37f94 Add FullyQualifiedAnnotationBeanNameGenerator.INSTANCE
Adds a static INSTANCE to FullyQualifiedAnnotationBeanNameGenerator,
just like its parent class, AnnotationBeanNameGenerator, does.

The class doesn't have any state and overriding/hiding the INSTANCE of
the superclass, this prevents unintended use of a regular
AnnotationBeanNameGenerator through
FullyQualifiedAnnotationBeanNameGenerator.INSTANCE.
2020-11-04 16:29:31 +01:00
Juergen Hoeller 95110d8257 Introduce TransactionalApplicationListener interface (with callback support)
Includes forPayload methods and common adapter classes for programmatic usage.
Aligns default order values for event handling delegates to LOWEST_PRECEDENCE.

Closes gh-24163
2020-10-22 15:19:32 +02:00
Сергей Цыпанов 8a04910bdd Drop explicit zeroing at instantiation of Atomic* objects 2020-10-06 15:45:12 +02:00
Juergen Hoeller 7116e5f755 Polishing 2020-09-25 20:40:54 +02:00
Sébastien Deleuze 2dbceb9053 Deprecate LiveBeansView
This commit deprecates LiveBeansView and related classes in order to allow
a future removal in order to increase the separation of concerns between
Spring Framework and Spring Boot, and the consistency between JVM
and native.

Closes gh-25820
2020-09-25 20:04:34 +02:00
Brian Clozel 61d893257e Rewrite "performance" test to JMH benchmarks
This commit rewrites the remaining "fastEnough" performance tests into
proper JMH benchmarks.

See gh-24830
2020-09-25 13:43:38 +02:00
Brian Clozel e02d3f32b4 Requalify tests as LONG_RUNNING
Prior to this commit, some tests would belong to the PERFORMANCE
`TestGroup`, while they were not testing for performance but rather
performing functional tests that involve long running operations or
timeouts.

This commit moves those tests to the LONG_RUNNING `TestGroup`.

See gh-24830
2020-09-25 13:43:38 +02:00
Juergen Hoeller 6c631e3d5c Merge branch '5.2.x'
# Conflicts:
#	spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.java
2020-09-25 11:36:18 +02:00
Juergen Hoeller c83f6adc24 Revise event multicaster locking for non-synchronized retriever caching
Closes gh-25799
2020-09-25 11:24:26 +02:00
Sam Brannen d7fab85f51 Merge branch '5.2.x' 2020-09-25 11:17:24 +02:00
Sam Brannen f5d36aa47a Revert use of Map::computeIfAbsent in thread and tx scopes
Issues gh-25038 and gh-25618 collectively introduced a regression for
thread-scoped and transaction-scoped beans.

For example, given a thread-scoped bean X that depends on another
thread-scoped bean Y, if the names of the beans (when used as map keys)
end up in the same bucket within a ConcurrentHashMap AND an attempt is
made to retrieve bean X from the ApplicationContext prior to retrieving
bean Y, then the use of Map::computeIfAbsent in SimpleThreadScope
results in recursive access to the same internal bucket in the map.

On Java 8, that scenario simply hangs. On Java 9 and higher,
ConcurrentHashMap throws an IllegalStateException pointing out that a
"Recursive update" was attempted.

In light of these findings, we are reverting the changes made to
SimpleThreadScope and SimpleTransactionScope in commits 50a4fdac6e and
148dc95eb1.

Closes gh-25801
2020-09-25 11:00:06 +02:00
Juergen Hoeller bbe74635eb Merge branch '5.2.x' 2020-09-18 18:16:33 +02:00
Juergen Hoeller c1617d3c52 Polishing 2020-09-18 18:15:36 +02:00
Juergen Hoeller 051de3f179 Configurable java.time.Clock on TaskScheduler implementations
Closes gh-25782
2020-09-18 10:21:48 +02:00
Juergen Hoeller e4a3d5bf66 Deprecation wording with suggested alternative and without removal hint
See gh-25733
See gh-25736
2020-09-15 13:22:34 +02:00
Brian Clozel 078543ce67 Deprecate Joda time support
This commit deprecates the Joda time support and schedules it for
removal in 6.0.

Closes gh-25736
2020-09-08 14:46:48 +02:00
Arjen Poutsma 91b609817e Do not use BitSet in BitsCronField
This commit changes BitsCronField to use a long instead of a BitSet,
since the later can use significant memory.

Closes gh-25687
2020-09-08 10:11:32 +02:00
Juergen Hoeller 3cc0db5fc3 Merge branch '5.2.x'
# Conflicts:
#	build.gradle
2020-09-07 19:27:25 +02:00
Juergen Hoeller 4b211fb18c Javadoc refinements 2020-09-07 19:20:26 +02:00
Juergen Hoeller 75f394ca85 Merge branch '5.2.x' 2020-09-07 17:54:51 +02:00
Juergen Hoeller 613b05d814 Properties loading with ignoreResourceNotFound covers SocketException as well
Closes gh-25717
2020-09-07 17:51:14 +02:00
Brian Clozel c5694506ae Early configuration of ApplicationStartup on BeanFactory
Prior to this commit, the `GenericApplicationContext` configured the
`AppliationStartup` on the `BeanFactory` only right before refreshing it.
Delaying this has no purpose and we should instead configure it as soon
as possible by overriding the setter method.

Closes gh-25718
2020-09-07 10:48:59 +02:00
Yanming Zhou a2bb59f1b8 Replace StringBuffer with StringBuilder where possible 2020-09-03 22:40:51 +02:00
Stephane Nicoll a06deac5db Merge branch '5.2.x' 2020-09-02 11:29:25 +02:00
Stephane Nicoll cdfdc340d2 Log cache hit and cache miss for synchronized access
Closes gh-25248
2020-09-02 11:29:03 +02:00
Juergen Hoeller 689adb4bd0 Merge branch '5.2.x'
# Conflicts:
#	build.gradle
2020-09-01 23:46:11 +02:00
Juergen Hoeller 141470ff58 Explicit nullability declarations for getTarget() implementations 2020-09-01 23:26:22 +02:00
Сергей Цыпанов 1f3e52d932 gh-25650 Replace remaining usage of LinkedList with ArrayList in tests 2020-08-31 14:33:14 +02:00
Juergen Hoeller 00c5dbf11a Merge branch '5.2.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java
2020-08-28 20:01:17 +02:00
Juergen Hoeller 6d9d4157ef Specifically detect Joda-Time 2.x
Closes gh-25655
2020-08-28 19:57:51 +02:00
Juergen Hoeller 2080878d82 Merge branch '5.2.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/parsing/ParseState.java
2020-08-27 14:40:54 +02:00
Juergen Hoeller cf2e0c7959 Selected use of ArrayList instead of LinkedList in common places
See gh-25652
2020-08-27 14:14:44 +02:00
Juergen Hoeller 60fa704f78 Consistent behavior for overloaded @Bean methods with ASM processing
Closes gh-25263
2020-08-27 14:13:33 +02:00
Juergen Hoeller 874574513c Replace remaining usage of LinkedList with ArrayList/ArrayDeque
Closes gh-25650
2020-08-26 18:32:08 +02:00
Juergen Hoeller ff11467a0c Avoid resizing of fixed-size HashMap/LinkedHashMap variants
Closes gh-25349
2020-08-25 19:26:18 +02:00
Juergen Hoeller 7324140d20 Merge branch '5.2.x' 2020-08-25 16:21:00 +02:00
Juergen Hoeller 6f0461c569 Polishing 2020-08-25 16:17:22 +02:00
Juergen Hoeller 04df9b8f49 Efficient checks for empty strings and single character matches
Closes gh-25552
Closes gh-25553
2020-08-25 16:17:12 +02:00
Juergen Hoeller 0d4040aa63 Avoid potential integer overflow in seconds->millis transformation
Closes gh-25613
2020-08-25 16:16:34 +02:00
Sam Brannen 0f7ad1b5bf Merge branch '5.2.x' 2020-08-22 23:50:28 +02:00
Sam Brannen 148dc95eb1 Fix regressions in SimpleThreadScope and SimpleTransactionScope
PR gh-25038 introduced regressions in SimpleThreadScope and
SimpleTransactionScope in Spring Framework 5.2.7. Specifically, if a
thread-scoped or transaction-scoped bean has a dependency on another
thread-scoped or transaction-scoped bean, respectively, a
ConcurrentModificationException will be thrown on Java 11 or higher.

The reason is that Java 11 introduced a check for concurrent
modification in java.util.HashMap's computeIfAbsent() implementation,
and such a modification can occur when a thread-scoped bean is being
created in order to satisfy a dependency of another thread-scoped bean
that is currently being created.

This commit fixes these regressions by switching from HashMap to
ConcurrentHashMap for the instance maps in SimpleThreadScope and
SimpleTransactionScope.

Closes gh-25618
2020-08-22 23:19:58 +02:00
Sam Brannen 1891f8af70 Merge branch '5.2.x' 2020-08-16 20:04:24 +02:00
Sam Brannen 93e5214d01 Revise Javadoc regarding log level for non-static BFPP @Bean method
Closes gh-25590
2020-08-16 20:03:46 +02:00
Sam Brannen c558391e2c Declare interfaces as @FunctionalInterface where feasible
This commit declares each of the following public interfaces as a
@FunctionalInterface.

- org.springframework.context.ApplicationContextInitializer
- org.springframework.test.web.servlet.DispatcherServletCustomizer
- org.springframework.validation.MessageCodeFormatter
- org.springframework.util.IdGenerator
- org.springframework.beans.factory.config.YamlProcessor.MatchCallback
- org.springframework.beans.factory.config.YamlProcessor.DocumentMatcher

Closes gh-25580
2020-08-11 17:01:03 +02:00
Sam Brannen 1f35cc5cae Polish contribution
See gh-25506
2020-08-10 14:17:04 +02:00
Qimiao Chen af8ab2e3a8 Optimize DefaultLifecycleProcessor::startBeans
Closes gh-25506
2020-08-10 14:08:14 +02:00
Juergen Hoeller e87a49c61c Merge branch '5.2.x' 2020-08-07 21:43:33 +02:00
Juergen Hoeller 292f581cdd Populate dependencies metadata for resolved target behind lazy dependency proxy
Closes gh-25562
2020-08-07 21:42:02 +02:00
Juergen Hoeller f4c0ceb1cc Merge branch '5.2.x'
# Conflicts:
#	build.gradle
#	spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslationInterceptor.java
#	spring-web/src/main/java/org/springframework/web/bind/support/WebRequestDataBinder.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExecutionChain.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java
2020-08-07 13:15:36 +02:00
Juergen Hoeller 8dd285f877 Polishing 2020-08-07 13:02:43 +02:00
Juergen Hoeller b345019415 Introduce getBeanProvider variants with allowEagerInit flag
Closes gh-25559
2020-08-07 12:07:13 +02:00
Stephane Nicoll 392f51cdd6 Merge branch '5.2.x' 2020-08-07 11:06:21 +02:00
Stephane Nicoll 6acbc5093a Indicate caches should be initialized in SimpleCacheManager
Closes gh-22988
2020-08-07 11:01:39 +02:00
Arjen Poutsma b0d273e047 Polishing 2020-08-05 11:26:25 +02:00
Arjen Poutsma 4d670ee25d Drop support for standalone "L" in CronExpression
This commit removes support for a standalone "L" in the
day-of-week of a cron expression, which used a locale-dependent
API to determine what the last day of the week is (Saturday or
Sunday ?).
Alternatively, we could have implement this in the exact way as Quartz
has done (i.e. treat the "L" like "SAT"), but we opted not to do that,
as having an explicit SAT or SUN is much clearer.
2020-08-05 09:42:18 +02:00
Arjen Poutsma 762cf0ffe8 Check for asterisk range in CronExpression
This commit makes sure that in CronExpression, the asterisk is only used
in a range field, and is not surrounded by unexpected characters.

Closes gh-19500
2020-08-04 16:34:02 +02:00
Arjen Poutsma 93b53dae29 Add support for Quartz features in CronExpression
This commit introduces support for Quartz-specific features in
CronExpression. This includes support for "L", "W", and "#".

Closes gh-20106
Closes gh-22436
2020-08-04 08:41:18 +02:00
Arjen Poutsma 1a8906bdc3 Support macros in CronExpression
This commit introduces supports for macros like "@yearly", "@monthly",
etc. in CronExpression.

Closes gh-25471
2020-08-04 07:51:32 +02:00
Arjen Poutsma dbec16d566 Add test for Friday 13th crontab failure
Added test for Friday 13th trigger, i.e. an uncommon crontab expression.
With the new CronExpression in place, this failure does not occur
anymore.

Closes gh-21574
2020-08-03 16:55:55 +02:00
Arjen Poutsma 72895f0810 Add test for combination of fixed date fields
Added test for a fixed day-of-week and day-of-month combination.
With the new CronExpression in place, this failure does not occur
anymore.

Closes gh-13621
2020-08-03 16:49:21 +02:00
Arjen Poutsma 87c3bb5797 Introduce CronExpression
This commit introduces CronExpression, a new for representing cron
expressions, and a direct replacement for CronSequenceGenerator.
2020-08-03 16:37:31 +02:00
Brian Clozel be801fc5fc Polish
See gh-24878
2020-07-28 14:48:25 +02:00
Juergen Hoeller a1a9bb3e7f Explicit note on phasing out serialization-based remoting
See gh-25379
2020-07-28 11:28:34 +02:00
Juergen Hoeller adce6593af Move metrics package to org.springframework.core
See gh-24878
2020-07-28 11:28:10 +02:00
Juergen Hoeller 9f211de113 Turn MethodArgumentNotValidException into subclass of BindException
Closes gh-23107
2020-07-28 11:08:04 +02:00
Brian Clozel 9301d7a294 Add application startup metrics support
This commit adds a new `StartupStep` interface and its factory
`ApplicationStartup`. Such steps are created, tagged with metadata and
thir execution time can be recorded - in order to collect metrics about
the application startup.

The default implementation is a "no-op" variant and has no side-effect.
Other implementations can record and collect events in a dedicated
metrics system or profiling tools. We provide here an implementation for
recording and storing steps with Java Flight Recorder.

This commit also instruments the Spring application context to gather
metrics about various phases of the application context, such as:

* context refresh phase
* bean definition registry post-processing
* bean factory post-processing
* beans instantiation and post-processing

Third part libraries involved in the Spring application context can
reuse the same infrastructure to record similar metrics.

Closes gh-24878
2020-07-27 22:37:14 +02:00
Sébastien Deleuze 05683fed7a Skip LoadTimeWeaverAwareProcessor with native images 2020-07-23 12:13:20 +02:00
Juergen Hoeller 718d46adac Check for alias overriding bean definition of same name
Closes gh-25430
2020-07-22 18:42:53 +02:00
Sam Brannen 335c3d5db6 Polish contribution
See gh-25445
2020-07-22 17:26:59 +02:00
XenoAmess ab859fcc96 Refine use of substring operations
Closes gh-25445
2020-07-22 17:26:42 +02:00
Sam Brannen a8901e3cf8 Polish contribution
See gh-25445
2020-07-22 16:36:14 +02:00
XenoAmess edfc6c0293 Refine use of substring operations
Closes gh-25445
2020-07-22 16:28:58 +02:00