더북(TheBook)

다음은 이 빈의 구성이 담긴 XML 구성 파일로 <context:annotation-config> 태그를 사용합니다.

예제 4-14 @PreDestroy를 사용한 빈을 구성([[post-construct-pre-destroy]] app-context-annotation.xml)

<beans ...>

    <context:annotation-config/>
    
    <bean id="destructiveBean"
        class="com.apress.prospring5.ch4.DestructiveBeanWithJSR250"
        p:filePath=
    "#{systemProperties['java.io.tmpdir']}#{systemProperties['file.separator']}test.txt"/>
</beans>
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.