Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-503

Properties injection from files to classes

    XMLWordPrintable

Details

    • This issue is security relevant

    Description

      I would like to be able to provide under META-INF folder my .properties file and have the the values automatically injected(loaded) into my bean using annotation injection. DeltaSpike offers something similar but with alot of tricky code.I would like to be able to do the following:
      case 1:
      public MyClass{
      @PropertiesInjection(file = "/path/to/file")
      private Properties properties
      }

      case 2:
      @PropertyPlaceholder(file = "path/to/file")
      public MyClass {
      @InjectProperty(name="property.name")
      private String propertyName

      @PropertyPlaceholder(file = "path/to/other/file")
      public void someMethod()

      { @InjectProperty(name = "other.property") String propertyName; endpoint = propertyName+port; }

      }

      Again it should be stated that would be nice to be able to apply the @PropertyPlaceholder annotation either as classlevel annotation and being able to override the value if it's in method level with different parameters.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cirix_jira Nikos Ballas (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: