Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-5213

Load Spring resources conditionally based on missing module(s)

    XMLWordPrintable

    Details

    • Complexity:
      Medium

      Description

      Those two syntaxes should enable to load resources conditionally based on the fact that a module is missing:

      1) Class annotation

      @OpenmrsProfile(modules = {"!exti18n"})
      public class YourSpringResource ... {
      ...
      }
      

      2) config.xml

      <conditionalResources>
        <conditionalResource>
          <path>/lib/yourmodule-api-*</path>
          <modules>
            <module>
              <moduleId>exti18n</moduleId>
              <version>!</version>
            </module>
          </modules>
        </conditionalResource>
      </conditionalResources>
      
      See also

      Talk thread: 'Core: @OpenmrsProfile to filter for modules that are absent'.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mksd Dimitri R
              Reporter:
              mksd Dimitri R
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: