@PreDestroy & @PostConstruct

19 views
Skip to first unread message

Enrico Morelli

unread,
Jun 8, 2018, 8:41:56 AM6/8/18
to Getting started with Spring Framework
The ch05-bankapp-jsr250 doesn't work well. The output of both main is:

INFO  org.springframework.context.support.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@117159c0: startup date [Fri Jun 08 14:38:58 CEST 2018]; root of context hierarchy
INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [META-INF/spring/applicationContext.xml]
INFO  sample.spring.chapter05.bankapp.dao.FixedDepositDaoImpl - FixedDepositDaoImpl's constructor invoked
INFO  sample.spring.chapter05.bankapp.dao.FixedDepositDaoImpl - FixedDepositDaoImpl's initializeDbConnection method invoked
INFO  sample.spring.chapter05.bankapp.service.FixedDepositServiceImpl - FixedDepositServiceImpl's setMyFixedDepositDao method invoked
INFO  sample.spring.chapter05.bankapp.dao.FixedDepositDaoImpl - FixedDepositDaoImpl's createFixedDeposit method invoked

The PostDestroy isn't executed.
JDK-10 with IntelliJ Idea 2018.
Reply all
Reply to author
Forward
0 new messages