HelloWorld obj = (HelloWorld) context.getBean("helloWorld");
obj.getMessage();
context.registerShutdownHook();
:context.close()
を使用して一方registerShutdownHook()との違いは何ですか近い()出力以下
Feb 03, 2017 11:46:12 AM org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh
INFO: Refreshing org[email protected]799f7e29: startup date [Fri Feb 03 11:46:12 IST 2017]; root of context hierarchy
Feb 03, 2017 11:46:12 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [Beans.xml]
Bean is going through init.
Your Message : Hello World!
Bean will destroy now.
が
Feb 03, 2017 11:53:57 AM org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh
INFO: Refreshing org[email protected]799f7e29: startup date [Fri Feb 03 11:53:57 IST 2017]; root of context hierarchy
Feb 03, 2017 11:53:57 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [Beans.xml]
Bean is going through init.
Your Message : Hello World!
Feb 03, 2017 11:53:57 AM org.springframework.context.support.ClassPathXmlApplicationContext doClose
INFO: Closing org[email protected]799f7e29: startup date [Fri Feb 03 11:53:57 IST 2017]; root of context hierarchy
Bean will destroy now.
は誰かが違いを説明してもらえ与えますか?