Uploaded image for project: 'Spring Data Geode'
  1. Spring Data Geode
  2. DATAGEODE-326

Add utility method in SpringUtils to get beans by type ordered by the @Order annotation or by the Ordered interface

    XMLWordPrintable

    Details

      Description

      This improvement adds the following methods to the org.springframework.data.gemfire.util.SpringUtils utility class:

      • getBeansOfTypeOrdered(:ConfigurableBeanFactory, :Class<?>)
      • getBeansOfTypeOrdered(:ConfigurableBeanFactory, :Class<?>, boolean, boolean)

      These methods call ListableBeanFactory.getBeansOfType(:Class<?>) and ListableBeanFactory.getBeansOfType(:Class, boolean, boolean), respectively.

      However, they additional decorate the base functionality with ordering and change the return type to only include a List of beans by type in order.

      The beans will be ordered according to the ordering semantics provided by the core Spring Framework, such as beans implementing the Ordered interface, or bean annotated with the @Order annotation. This includes BeanDefinition methods (i.e. @Bean) methods in @Configuration classes.

        Attachments

          Activity

            People

            Assignee:
            jblum John Blum
            Reporter:
            jblum John Blum
            Last updater:
            Mark Paluch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: