Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-8039

Introduce FeatureSpecifications for BeanDefinitionParsers as appropriate

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Last commented by a User:
      true

      Description

      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 SPR-8166 (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

          Issue Links

          1.
          Introduce CacheAnnotationDriven for AnnotationDrivenCacheBeanDefinitionParser (cache:annotation-driven) Sub-task Resolved Chris Beams
          2.
          SpringConfiguredBeanDefinitionParser (aop:spring-configured) Sub-task Resolved Chris Beams
          3.
          SpringConfiguredBeanDefinitionParser (context:spring-configured) Sub-task Resolved Chris Beams
          4.
          LoadTimeWeaverBeanDefinitionParser (context:load-time-weaver) Sub-task Resolved Chris Beams
          5.
          Introduce MvcInterceptors for InterceptorsBeanDefinitionParser (mvc:interceptors) Sub-task Resolved Rossen Stoyanchev
          6.
          Introduce MvcAnnotationDriven for AnnotationDrivenBeanDefinitionParser (mvc:annotation-driven) Sub-task Resolved Rossen Stoyanchev
          7.
          Introduce ComponentScanSpec for ComponentScanBeanDefinitionParser (context:component-scan) Sub-task Resolved Chris Beams
          8.
          Introduce MvcDefaultServletHandler for DefaultServletHandlerBeanDefinitionParser (mvc:default-servlet-handler) Sub-task Resolved Rossen Stoyanchev
          9.
          Introduce MvcViewControllers for ViewControllersBeanDefinitionParser (mvc:view-controllers) Sub-task Resolved Rossen Stoyanchev
          10.
          Introduce TxAnnotationDriven for AnnotationDrivenBeanDefinitionParser (tx:annotation-driven) Sub-task Resolved Chris Beams
          11.
          Investigate MBeanExportBeanDefinitionParser (context:mbean-server) Sub-task Resolved Chris Beams
          12.
          Investigate MBeanExportBeanDefinitionParser (context:mbean-export) Sub-task Resolved Chris Beams
          13.
          Investigate MBeanServerBeanDefinitionParser (context:mbean-server) Sub-task Resolved Chris Beams
          14.
          Investigate JndiLookupBeanDefinitionParser (jee:jndi-lookup) Sub-task Resolved Chris Beams
          15.
          Investigate LocalStatelessSessionBeanDefinitionParser (jee:local-slsb) Sub-task Resolved Chris Beams
          16.
          Investigate RemoteStatelessSessionBeanDefinitionParser (jee:remote-slsb) Sub-task Resolved Chris Beams
          17.
          Introduce TaskAnnotationDriven for AnnotationDrivenBeanDefinitionParser (task:annotation-driven) Sub-task Resolved Unassigned
          18.
          Investigate ExecutorBeanDefinitionParser (task:executor) Sub-task Resolved Unassigned
          19.
          Investigate ScheduledTasksBeanDefinitionParser (task:scheduled) Sub-task Resolved Unassigned
          20.
          Investigate SchedulerBeanDefinitionParser (task:scheduler) Sub-task Resolved Unassigned
          21.
          Investigate ScriptBeanDefinitionParser (lang:*) Sub-task Resolved Chris Beams
          22.
          Investigate TxAdviceBeanDefinitionParser (tx:advice) Sub-task Resolved Chris Beams
          23.
          Investigate JtaTransactionManagerBeanDefinitionParser (tx:jta-transaction-manager) Sub-task Resolved Chris Beams
          24.
          Investigate Jaxb2MarshallerBeanDefinitionParser (oxm:jaxb2-marshaller) Sub-task Resolved Chris Beams
          25.
          Investigate JibxMarshallerBeanDefinitionParser (oxm:jibx-marshaller) Sub-task Resolved Chris Beams
          26.
          Investigate XmlBeansMarshallerBeanDefinitionParser (oxm:xmlbeans-marshaller) Sub-task Resolved Chris Beams
          27.
          Introduce FeatureSpecification for PropertyOverrideBeanDefinitionParser (context:property-override) Sub-task Resolved Chris Beams
          28.
          Introduce FeatureSpecification for PropertyPlaceholderBeanDefinitionParser (context:property-placeholder) Sub-task Resolved Chris Beams
          29.
          Introduce FeatureSpecification for EmbeddedDatabaseBeanDefinitionParser (jdbc:embedded-database) Sub-task Resolved Chris Beams
          30.
          Introduce FeatureSpecification for InitializeDatabaseBeanDefinitionParser (jdbc:initialize-database) Sub-task Resolved Chris Beams
          31.
          Introduce FeatureSpecification for AnnotationDrivenBeanDefinitionParser (context:annotation-driven) Sub-task Resolved Chris Beams
          32.
          Introduce JmsListenerContainer for JmsListenerContainerParser (jms:listener-container) Sub-task Resolved Chris Beams
          33.
          Introduce JcaListenerContainer for JcaListenerContainerParser (jms:jca-listener-container) Sub-task Resolved Chris Beams
          34.
          Investigate ScopedProxyBeanDefinitionDecorator (aop:scoped-proxy) Sub-task Resolved Chris Beams
          35.
          Introduce FeatureSpecification types for util:* elements and parsers Sub-task Resolved Chris Beams

            Activity

              People

              • Assignee:
                cbeams Chris Beams
                Reporter:
                cbeams Chris Beams
                Last updater:
                Spring Issuemaster
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  47 weeks, 2 days ago