Spring EL: métodos Java con propiedades como argumentos.

Usando Spring EL es posible ejecutar métodos Java a partir de una clase o de un bean, y pasarle argumentos recogidos de los archivos de propiedades.


<bean id="myBean" class="com.xoubin.service.MyClass" />

<bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
    <property name="url" value="${ldap.url}" />
    <property name="base" value="${ldap.base}" />
    <property name="userDn" value="${ldap.userdn}" />
    <property name="password" value="#{ myBean.getPass('arg0', '${ldap.encrypted.id}') }" />
</bean>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s