Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-912

Adding ConditionalOnProperty to spring

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      This issue seems to be a variant of SPR-11750, however I have created a new feature request as the description is not exactly the same thing.

      I would like to suggest that beans can be enabled based upon whether some property or a value is set or not set in the Environment of the application context.

      The concrete usage which I have is somewhat related to SWS-911, where a URL connection factory has to be created based upon proxy settings in the environment, however I can think that there must be other valid usage scenarios, where beans should be registered based on some settings in the environment.

      Currently the spring core already has a limit support for Conditional Bean registration, however this is based on the profile.

      It has been argued in SPR-11750 that this feature exists in Spring-boot, however it is not necessary the case that one uses spring-boot.

      As an alternative to provide an implementation I would like to suggest that ConditionalOnXX are moved to Spring-core from Spring-boot.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            mat013 Meang Akira Tanaka
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: