Description
Chris Beams opened SPR-8039 and commented
Most BeanDefinitionParsers
are candidates for extraction of a FeatureSpecification
type usable from within @Feature
methods.
Some are not. For example, PropertyPlaceholderBeanDefinitionParser
(context:property-placeholder
) need not have a dedicated FeatureSpecification
because (a) the implementation of PPBDP
is so simple, and (b) a Property(Sources)PlaceholderConfigurer
can be configured and returned directly from a @Bean
method - no @Feature
required.
At time of this writing, there are certain BDP
impls for which it's not certain whether a FeatureSpecification
extraction is appropriate. Titles for these subtask issues below are prefixed with "Investigate ...". These BDPs need to be evaluated as to whether they genuinely represent a "feature of the container", or are simply a convenience for registering a single bean. In the former case, a FeatureSpecification
should likely be extracted. In the latter, direct translation to @Bean
methods by users should be straightforward.
In cases where no dedicated FeatureSpecification
is introduced, the BeanDefinitionParser
implementation and probably also the XSD documentation should be updated to reflect how the functionality provided by this parser/element should be achieved when using @Bean
methods to configure the container.
You'll notice that a subtask exists below for nearly every Spring XML namespace element shipped with the core container. Even though some elements/parsers are not candidates for FeatureSpecification
extraction, the subtask remains in order to provide a single point of reference for users and maintainers about these decisions. Issues such as #12817 (regarding jdbc:embedded-database
) are resolved as "Won't Fix" with an explanation why a FeatureSpecification
refactoring is not necessary and instructing users how to achieve the same functionality in a @Bean
method (configuring an EmbeddedDatabaseBuilder
and returning its DataSource
product).
Attachments:
- Screen shot 2011-03-12 at 6.10.50 PM.png (368.92 kB)
Sub-tasks:
- Introduce MvcInterceptors for InterceptorsBeanDefinitionParser (mvc:interceptors) [SPR-7976] #12631 Introduce MvcInterceptors for InterceptorsBeanDefinitionParser (mvc:interceptors)
- Introduce CacheAnnotationDriven for AnnotationDrivenCacheBeanDefinitionParser (cache:annotation-driven) [SPR-8137] #12788 Introduce CacheAnnotationDriven for AnnotationDrivenCacheBeanDefinitionParser (cache:annotation-driven)
- SpringConfiguredBeanDefinitionParser (aop:spring-configured) [SPR-8139] #12790 SpringConfiguredBeanDefinitionParser (aop:spring-configured)
- LoadTimeWeaverBeanDefinitionParser (context:load-time-weaver) [SPR-8140] #12791 LoadTimeWeaverBeanDefinitionParser (context:load-time-weaver)
- SpringConfiguredBeanDefinitionParser (context:spring-configured) [SPR-8141] #12792 SpringConfiguredBeanDefinitionParser (context:spring-configured)
- Introduce MvcAnnotationDriven for AnnotationDrivenBeanDefinitionParser (mvc:annotation-driven) [SPR-8142] #12793 Introduce MvcAnnotationDriven for AnnotationDrivenBeanDefinitionParser (mvc:annotation-driven)
- Introduce ComponentScanSpec for ComponentScanBeanDefinitionParser (context:component-scan) [SPR-8143] #12794 Introduce ComponentScanSpec for ComponentScanBeanDefinitionParser (context:component-scan)
- Introduce MvcDefaultServletHandler for DefaultServletHandlerBeanDefinitionParser (mvc:default-servlet-handler) [SPR-8144] #12795 Introduce MvcDefaultServletHandler for DefaultServletHandlerBeanDefinitionParser (mvc:default-servlet-handler)
- Introduce MvcViewControllers for ViewControllersBeanDefinitionParser (mvc:view-controllers) [SPR-8145] #12796 Introduce MvcViewControllers for ViewControllersBeanDefinitionParser (mvc:view-controllers)
- Introduce TxAnnotationDriven for AnnotationDrivenBeanDefinitionParser (tx:annotation-driven) [SPR-8146] #12797 Introduce TxAnnotationDriven for AnnotationDrivenBeanDefinitionParser (tx:annotation-driven)
- Introduce TaskAnnotationDriven for AnnotationDrivenBeanDefinitionParser (task:annotation-driven) [SPR-8147] #12798 Introduce TaskAnnotationDriven for AnnotationDrivenBeanDefinitionParser (task:annotation-driven)
- Investigate MBeanExportBeanDefinitionParser (context:mbean-server) [SPR-8149] #12800 Investigate MBeanExportBeanDefinitionParser (context:mbean-server)
- Investigate MBeanExportBeanDefinitionParser (context:mbean-export) [SPR-8150] #12801 Investigate MBeanExportBeanDefinitionParser (context:mbean-export)
- Investigate MBeanServerBeanDefinitionParser (context:mbean-server) [SPR-8151] #12802 Investigate MBeanServerBeanDefinitionParser (context:mbean-server)
- Investigate JndiLookupBeanDefinitionParser (jee:jndi-lookup) [SPR-8152] #12803 Investigate JndiLookupBeanDefinitionParser (jee:jndi-lookup)
- Investigate LocalStatelessSessionBeanDefinitionParser (jee:local-slsb) [SPR-8153] #12804 Investigate LocalStatelessSessionBeanDefinitionParser (jee:local-slsb)
- Investigate RemoteStatelessSessionBeanDefinitionParser (jee:remote-slsb) [SPR-8154] #12805 Investigate RemoteStatelessSessionBeanDefinitionParser (jee:remote-slsb)
- Investigate ExecutorBeanDefinitionParser (task:executor) [SPR-8155] #12806 Investigate ExecutorBeanDefinitionParser (task:executor)
- Investigate ScheduledTasksBeanDefinitionParser (task:scheduled) [SPR-8156] #12807 Investigate ScheduledTasksBeanDefinitionParser (task:scheduled)
- Investigate SchedulerBeanDefinitionParser (task:scheduler) [SPR-8157] #12808 Investigate SchedulerBeanDefinitionParser (task:scheduler)
- Investigate ScriptBeanDefinitionParser (lang:*) [SPR-8158] #12809 Investigate ScriptBeanDefinitionParser (lang:*)
- Investigate TxAdviceBeanDefinitionParser (tx:advice) [SPR-8159] #12810 Investigate TxAdviceBeanDefinitionParser (tx:advice)
- Investigate JtaTransactionManagerBeanDefinitionParser (tx:jta-transaction-manager) [SPR-8160] #12811 Investigate JtaTransactionManagerBeanDefinitionParser (tx:jta-transaction-manager)
- Investigate Jaxb2MarshallerBeanDefinitionParser (oxm:jaxb2-marshaller) [SPR-8161] #12812 Investigate Jaxb2MarshallerBeanDefinitionParser (oxm:jaxb2-marshaller)
- Investigate JibxMarshallerBeanDefinitionParser (oxm:jibx-marshaller) [SPR-8162] #12813 Investigate JibxMarshallerBeanDefinitionParser (oxm:jibx-marshaller)
- Investigate XmlBeansMarshallerBeanDefinitionParser (oxm:xmlbeans-marshaller) [SPR-8163] #12814 Investigate XmlBeansMarshallerBeanDefinitionParser (oxm:xmlbeans-marshaller)
- Introduce FeatureSpecification for PropertyOverrideBeanDefinitionParser (context:property-override) [SPR-8164] #12815 Introduce FeatureSpecification for PropertyOverrideBeanDefinitionParser (context:property-override)
- Introduce FeatureSpecification for PropertyPlaceholderBeanDefinitionParser (context:property-placeholder) [SPR-8165] #12816 Introduce FeatureSpecification for PropertyPlaceholderBeanDefinitionParser (context:property-placeholder)
- Introduce FeatureSpecification for EmbeddedDatabaseBeanDefinitionParser (jdbc:embedded-database) [SPR-8166] #12817 Introduce FeatureSpecification for EmbeddedDatabaseBeanDefinitionParser (jdbc:embedded-database)
- Introduce FeatureSpecification for InitializeDatabaseBeanDefinitionParser (jdbc:initialize-database) [SPR-8167] #12818 Introduce FeatureSpecification for InitializeDatabaseBeanDefinitionParser (jdbc:initialize-database)
- Introduce FeatureSpecification for AnnotationDrivenBeanDefinitionParser (context:annotation-driven) [SPR-8168] #12819 Introduce FeatureSpecification for AnnotationDrivenBeanDefinitionParser (context:annotation-driven)
- Introduce JmsListenerContainer for JmsListenerContainerParser (jms:listener-container) [SPR-8169] #12820 Introduce JmsListenerContainer for JmsListenerContainerParser (jms:listener-container)
- Introduce JcaListenerContainer for JcaListenerContainerParser (jms:jca-listener-container) [SPR-8170] #12821 Introduce JcaListenerContainer for JcaListenerContainerParser (jms:jca-listener-container)
- Investigate ScopedProxyBeanDefinitionDecorator (aop:scoped-proxy) [SPR-8171] #12822 Investigate ScopedProxyBeanDefinitionDecorator (aop:scoped-proxy)
- Introduce FeatureSpecification types for util:* elements and parsers [SPR-8172] #12823 Introduce FeatureSpecification types for util:* elements and parsers
Issue Links:
- Decouple XML parsing from bean registration in BeanDefinitionParsers [SPR-5102] #9775 Decouple XML parsing from bean registration in BeanDefinitionParsers
Referenced from: commits 111fb71