Overview
As discussed in https://github.com/spring-projects/spring-framework/issues/30846#issuecomment-1628849776, since Constants is an outdated utility that uses reflection (which is not native-friendly), we should deprecate Constants and stop using it internally.
Related Issues
-
30846
-
30854
Deliverables
- [x] Deprecate
Constants. - [x] Stop using
Constantsin the code base. spring-context- [x]
MBeanExporter
- [x]
spring-aop- [x]
CustomizableTraceInterceptor
- [x]
spring-beans- [x]
PropertyPlaceholderConfigurer - [x]
XmlBeanDefinitionReader
- [x]
spring-context-support- [x]
CronTriggerFactoryBean - [x]
SimpleTriggerFactoryBean
- [x]
spring-jdbc- [x]
IsolationLevelDataSourceAdapter - [x]
LazyConnectionDataSourceProxy - [x]
IsolationLevelDataSourceRouter
- [x]
spring-jms- [x]
DefaultMessageListenerContainer - [x]
JmsActivationSpecConfig - [x]
JmsAccessor
- [x]
spring-tx- [x]
AbstractPlatformTransactionManager - [x]
DefaultTransactionDefinition
- [x]
Comment From: sbrannen
See commit 679b668bbb2892f0b2883bc6726453dca69b7233 for an example of how Constants can be replaced by a simple Map in some use cases.
Comment From: snicoll
See #31328 - I wonder if a review of the changes above should be considered to see if a similar restriction was introduced.