You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by ellirael <el...@mail.ru> on 2016/05/30 11:35:29 UTC
How to inject constant values to my properties via blueprint?
How should I do it? For example I use something like this:
<value>#{T(mypack.MyInterface).ROLE_NAME}</value>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-inject-constant-values-to-my-properties-via-blueprint-tp4046734.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to inject constant values to my properties via blueprint?
Posted by ellirael <el...@mail.ru>.
I have got an interface that holds my constant values. For example rolenames.
Now I want inject one of my constant value to bean's property.
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-inject-constant-values-to-my-properties-via-blueprint-tp4046734p4046736.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to inject constant values to my properties via blueprint?
Posted by ellirael <el...@mail.ru>.
Any ideas? It is common task to init something with constant values.
Another example:
<bean id="credentialsMatcher"
class="org.apache.shiro.authc.credential.HashedCredentialsMatcher">
<property name="hashAlgorithmName" value="MD5" />
</bean>
I need to use constant value instead String one. Like this:
<bean id="credentialsMatcher"
class="org.apache.shiro.authc.credential.HashedCredentialsMatcher">
<property name="hashAlgorithmName"
value="$${org.apache.shiro.crypto.hash.Md5Hash.ALGORITHM_NAME}" />
</bean>
--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-inject-constant-values-to-my-properties-via-blueprint-tp4046734p4046749.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: How to inject constant values to my properties via blueprint?
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
Not sure I understand what you mean. You mean in default value for a
property in a property place holder ?
Or directly in the bean setter ?
Regards
JB
On 05/30/2016 01:35 PM, ellirael wrote:
> How should I do it? For example I use something like this:
> <value>#{T(mypack.MyInterface).ROLE_NAME}</value>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-inject-constant-values-to-my-properties-via-blueprint-tp4046734.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofr
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com