我的 XML:
<?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:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="add" class="com.basu.Address">
<property name="H_NO" value="7"/>
<property name="city" value="bellary"/>
<property name="state" value="karnataka"/>
</bean>
<bean id="per" class="com.basu.person" >
<property name="cityname" value="#{add.city}"/>
</bean>
</beans>
我想要输出(地址 Bean):-
7
bellary
karnataka
我想要输出(person Bean):-
bellary