Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-1364

Variable Replacement with @ConfigProperty not project stage aware

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.8.2
    • Fix Version/s: None
    • Component/s: Configuration
    • Labels:
      None

      Description

      reading a property with injection does not correctly use project stage properties.

      I have a property file with this content:

       

      xxx.frontend.prefix=https://dev.xxx.it
      xxx.frontend.prefix.Production=https://prod.xxx.it
      xxx.rsalogin.url=${xxx.frontend.prefix}/#/rsalogin/{rsalogin}
      

       

       

      when reading xxx.rsalogin.url using annontations

      @Inject
      @ConfigProperty(name = "xxx.rsalogin.url")
      private String url;
      

      In the production environment (noticed that I don't have a org.apache.deltaspike.ProjectStage=Production property set because by default the stage is Production) it should be evaluated as https://prod.xxx.it/#/rsalogin/{rsalogin} but instead I get https://dev.xxx.it/#/rsalogin/{rsalogin}

      When using the declarative API it works correctly

      ConfigResolver.getProjectStageAwarePropertyValue("xxx.rsalogin.url", "");

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              n.chieffo@tecla.it Nicolò Chieffo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: