Comments on: Spring ApplicationContext https://java2blog.com/spring-applicationcontext/?utm_source=rss&utm_medium=rss&utm_campaign=spring-applicationcontext A blog on Java, Python and C++ programming languages Mon, 11 Jan 2021 12:35:07 +0000 hourly 1 https://wordpress.org/?v=6.2.9 By: A.P. https://java2blog.com/spring-applicationcontext/#comment-983 Thu, 25 Jun 2015 17:52:20 +0000 http://www.java2blog.com/?p=424#comment-983 Hi, do you have any guide when to use which XmlApplicationContext?

I'm new to Spring and I have no idea when to use GenericXmlApplicationContext, ClassPathXmlApplicationContext, etc.

Thanks

]]>
By: imran https://java2blog.com/spring-applicationcontext/#comment-982 Tue, 07 Oct 2014 15:23:31 +0000 http://www.java2blog.com/?p=424#comment-982 So, I guess to my understanding, implementing the interface on the Country bean is an alternative to making the Capital bean an inner bean in the xml. Because if I make the Capital bean an inner bean, then I don't have to implement ant interface. Let me know if I am wrong.

]]>
By: imran https://java2blog.com/spring-applicationcontext/#comment-981 Tue, 07 Oct 2014 15:09:37 +0000 http://www.java2blog.com/?p=424#comment-981 Great tutorial.
Just a kinf FYI: I think the final output is wrong. Instead of “India's Capital Name:Delhi”, it is actually outputting “Capital Name:Delhi”.

]]>
By: arpitmandliya https://java2blog.com/spring-applicationcontext/#comment-980 Tue, 19 Feb 2013 15:25:45 +0000 http://www.java2blog.com/?p=424#comment-980 Hi Mikel,
There no need to call “countryObj.setApplicationContext(appContext);” because when you implements ApplicationContextAware interface,it internally call set method and set ApplicationContext.
Thank you for your comment.I will update this in article.

]]>
By: Mikel https://java2blog.com/spring-applicationcontext/#comment-979 Tue, 19 Feb 2013 12:44:40 +0000 http://www.java2blog.com/?p=424#comment-979 Hi

I think that there is an error in your code. You hadn't set the applicationContext of the country object. So it's null.

To avoid it, you must write “countryObj.setApplicationContext(appContext);” after getting country's bean

Tell me if I'm wrong…

Sorry for my english and congratulations for your tutorial. It's really useful!

]]>