I. Introduction
To simplify the configuration xml file, an increasing number of XML documents using attributes instead of child elements of configuration information. spring introduced a namespace syntax, by <Bean>
the member attribute configuration variables Bean object.
II. P-namespace configuration information
First click on the lower left corner xml file "Namespaces", hook on the p-http: //springframework.org/schema/p, as shown below:
applicationContext.xml
<bean id="book" class="com.atguigu.spring.bean.Book">
<property name="book_id" value="1001"></property>
<property name="title" >
<value><![CDATA[<<Thinking in Java>>]]></value>
</property>
</bean>
<bean id="person1" class="com.atguigu.spring.bean.Person"
p:name="老李" p:book-ref="book">
</bean>