[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15590918#comment-15590918
 ] 

ASF GitHub Bot commented on DELTASPIKE-1208:
--------------------------------------------

GitHub user maecval opened a pull request:

    https://github.com/apache/deltaspike/pull/67

    DELTASPIKE-1208: Fixed variable replacement in configured values for …

    ### deltaspike configuration issue DELTASPIKE-1208
    (https://issues.apache.org/jira/browse/DELTASPIKE-1208)
    
    This solves the issue that the "foo.bar" was not resolved correctly in the 
following case when using getProjectStageAwarePropertyValue.
    
    configuration values:
    ```
    foo.url=${bar.url}/services
    bar.url=undefined
    bar.url.UnitTest=http://bar-dev
    bar.url.Production=http://bar-prod
    ```
    
    Expected for project stage "Production"
    ```
    http://bar-prod/services
    ```
    when executing
    ```
    ConfigResolver.getProjectStageAwarePropertyValue("foo.url")
    ```


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/maecval/deltaspike DELTASPIKE-1208

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/deltaspike/pull/67.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #67
    
----
commit 0c90a6188f63b731bab119074d9f903ffc530ea5
Author: tzhmava4 <valentin.maech...@swisscom.com>
Date:   2016-10-20T05:52:42Z

    DELTASPIKE-1208: Fixed variable replacement in configured values for 
getProjectStageAwarePropertyValue

----


> deltaspike configuration: Variable Replacement in Configured Values is NOT 
> fully stage aware
> --------------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-1208
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1208
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 1.7.1
>            Reporter: Valentin Maechler
>            Assignee: John D. Ament
>            Priority: Minor
>             Fix For: 1.7.2
>
>         Attachments: DELTASPIKE-1208.patch
>
>
> using the following apache-deltaspike.properties 
> {code}
> some-service-url=${edge-server-url}/some-service
> edge-server-url=undefined
> edge-server-url.Development=http://development:8081
> edge-server-url.Staging=http://staging:8081
> edge-server-url.Production=http://prod:8081
> {code}
> and executing the following code:
> {code}
> System.out.println("some-service-url="+ConfigResolver.getProjectStageAwarePropertyValue("some-service-url"));
> {code}
> having the following java VM arg set:
> {code}
> -Dorg.apache.deltaspike.ProjectStage=Staging
> {code}
> should result in the output: 
> some-service-url=http://staging:8081/some-service
> I have already contributed a bug fix for DELTASPIKE-1167 - unfortunately that 
> didn't fully solve the issue.
> -I plan to provide a fix for this soon.- [UPDATE] patch added



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to