이전까지 작업했던 내용 )
<?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>"
xmlns:aop="<http://www.springframework.org/schema/aop>"
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>
<http://www.springframework.org/schema/aop> <http://www.springframework.org/schema/aop/spring-aop-4.3.xsd>">
<!-- 패키지를 스캔해준다. 다 해주는 것은 아니고 표시되어진 클래스만 스캔해준다 -> 이것이 어노테이션 -->
<!-- <context:component-scan base-package="polymorphism"></context:component-scan> -->
<context:component-scan base-package="com.springbook.biz"></context:component-scan>
<!-- <bean id="log" class="com.springbook.biz.common.LogAdvice" ></bean> -->
<bean id="log" class="com.springbook.biz.common.Log4jAdvice" ></bean>
<bean id="around" class="com.springbook.biz.common.AroundAdvice" ></bean>
<aop:config>
<aop:pointcut expression="execution(* com.springbook.biz..*Impl.*(..))" id="allPointcut"/>
<aop:aspect ref="around"> <!-- 동작시점 -->
<!-- 대상, 적용할 기능 -->
<aop:around pointcut-ref="allPointcut" method="aroundLog"/>
</aop:aspect>
</aop:config>
<!-- = SamsungTV tv = new SamsungTV(); -->
<!-- <bean id="" class=""></bean> -->
<!-- <bean id="tv" class="polymorphism.SamsungTV"></bean> 싱글톤 패턴 사용 -->
<!-- scope="prototype"을 추가하면 싱글톤 패턴 사용을 하지 않을 수 있다. -->
<!-- 생성자 의존 주입 -->
<!--<bean id="tv" class="polymorphism.SamsungTV" scope="prototype"> -->
<!-- 괸계설정 -->
<!-- <constructor-arg ref="apple"></constructor-arg> -->
<!-- 기본형 관계설정 시 value를 쓴다 -->
<!-- <constructor-arg value="10000"></constructor-arg> -->
<!-- </bean> -->
<!-- Setter 메소드 의존 주입 -->
<!-- <bean id="tv" class="polymorphism.SamsungTV" scope="prototype">
<property name="speaker" ref="sony"></property>
<property name="price" value="10000"></property>
</bean>
<bean id="sony" class="polymorphism.SonySpeaker"></bean>
<bean id="apple" class="polymorphism.AppleSpeaker"></bean> -->
</beans>