person.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:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
<context:annotation-config/>
<bean class="cohttp://m.config.Cat" id="cat">
<property name="catAge" value="20"/>
<property name="catName" value="야옹이"/>
</bean>
<bean class="cohttp://m.config.Person" id="xxx">
<property name="name" value="유관순"></property>
</bean>
<bean class="cohttp://m.config.Person" id="person">
<property name="name" value="#{xxx.getXXX()}"/> <!-- id.name까지 --> this.getName = 유관순
<property name="age" value="#{cat.catAge}"/> 20
<!-- <property name="cat" ref="cat"/> -->
<property name="cat" value="#{cat}"/> catAge && catName
</bean>
</beans>
'단순 코드 기록 > Spring' 카테고리의 다른 글
Spring_MVC (0) | 2024.02.08 |
---|---|
Spring_context-scan (0) | 2024.02.08 |
Spring_Value (0) | 2024.02.08 |
Spring_@Resource (0) | 2024.02.08 |
Spring_Multi Config (0) | 2024.02.08 |