You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@deltaspike.apache.org by Sándor Norbert <sa...@tarr.hu> on 2017/10/12 15:13:29 UTC
configuration / project stage question
Hello,
I'm experimenting with DeltaSpike configuration using release 1.8.0, in
a JBoss EAP6.4 based application.
I have a very simple project:
_META-INF/apache-deltaspike.properties_
a.Development=dev-a
a.Production=prod-a
b=a: ${a}
_CDI bean_
@Inject
@ConfigProperty(name = "a")
private String a;
@Inject
@ConfigProperty(name = "b")
private String b;
@PostConstruct
public void initialize() {
System.out.println(a);
System.out.println(b);
}
The project stage is "computed" correctly as Development (I configured
it using a system property).
But the output is:
[stdout] dev-a
[stdout] a: ${a}
So the variable is not resolved. Based on the documentation I would expect:
[stdout] dev-a
[stdout] a: dev-a
Am I misunderstand the property resolution process?
Thanks for your help in advance.
Best regards:
Norbi
Re: configuration / project stage question
Posted by Mark Struberg <st...@yahoo.de.INVALID>.
No, this should actually work. Do you mind shipping a patch to our existing unit test to show the behaviour?
Much easier for us to tackle this with a unit test.
txs and LieGrue,
strub
> Am 12.10.2017 um 17:13 schrieb Sándor Norbert <sa...@tarr.hu>:
>
> Hello,
>
> I'm experimenting with DeltaSpike configuration using release 1.8.0, in a JBoss EAP6.4 based application.
>
> I have a very simple project:
>
> _META-INF/apache-deltaspike.properties_
>
> a.Development=dev-a
> a.Production=prod-a
> b=a: ${a}
>
> _CDI bean_
>
> @Inject
> @ConfigProperty(name = "a")
> private String a;
>
> @Inject
> @ConfigProperty(name = "b")
> private String b;
>
> @PostConstruct
> public void initialize() {
> System.out.println(a);
> System.out.println(b);
> }
>
> The project stage is "computed" correctly as Development (I configured it using a system property).
> But the output is:
>
> [stdout] dev-a
> [stdout] a: ${a}
>
> So the variable is not resolved. Based on the documentation I would expect:
>
> [stdout] dev-a
> [stdout] a: dev-a
>
> Am I misunderstand the property resolution process?
>
> Thanks for your help in advance.
> Best regards:
> Norbi
>