zoukankan      html  css  js  c++  java
  • 关于spring的p标签(转)

    spring p标签是spring内置的,只要在xml头部申明下就可以调用,用法相当于<property>

    比如

    <?xml version="1.0" encoding="UTF-8"?>
    <beans
    xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:p="http://www.springframework.org/schema/p"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
    <bean id="loginAction" class="com.ambow.exam.action.LoginAction" p:nam="sasa"></bean>
    </beans>

    这里是给LoginAction里给nam注入值sasa

    这里相当于

    <?xml version="1.0" encoding="UTF-8"?>
    <beans
    xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:p="http://www.springframework.org/schema/p"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
    <bean id="loginAction" class="com.ambow.exam.action.LoginAction">
    <property name="nam">
    <value>sasa</value>
    </property>
    </bean>
    </beans>

    http://www.cnblogs.com/iloveu/archive/2009/01/21/1379615.html

  • 相关阅读:
    C
    A
    G
    B
    一些新玩意:
    Angular常用功能
    node学习笔记(四)
    node学习笔记(三)
    node学习笔记(二)
    node学习笔记
  • 原文地址:https://www.cnblogs.com/helife/p/2114143.html
Copyright © 2011-2022 走看看