类 SimplePropertyNamespaceHandler

  • 所有已实现的接口:
    NamespaceHandler

    public class SimplePropertyNamespaceHandler
    extends Object
    implements NamespaceHandler
    Simple NamespaceHandler implementation that maps custom attributes directly through to bean properties. An important point to note is that this NamespaceHandler does not have a corresponding schema since there is no way to know in advance all possible attribute names.

    An example of the usage of this NamespaceHandler is shown below:

     <bean id="rob" class="..TestBean" p:name="Rob Harrop" p:spouse-ref="sally"/>
    Here the 'p:name' corresponds directly to the 'name' property on class 'TestBean'. The 'p:spouse-ref' attributes corresponds to the 'spouse' property and, rather than being the concrete value, it contains the name of the bean that will be injected into that property.
    从以下版本开始:
    2.0
    作者:
    Rob Harrop, Juergen Hoeller