Difference between BeanFactory and ApplicationContext in Spring?

 BeanFactory-Does not support the Annotation based dependency Injection.
 ApplicationContext--Support Annotation based dependency Injection.-@Autowired, @PreDestroy
 BeanFactory-Does not Support
ApplicationContext- Application contexts can publish events to beans that are registered as listeners
BeanFactory-Does not support way to access Message Bundle(internationalization (I18N) 
ApplicationContext-Support internationalization (I18N) messages.
BeanFactory-Doesn’t support.
ApplicationContext-Support  many enterprise services such JNDI access, EJB integration, remoting.
BeanFactory-By default its support Lazy loading
ApplicationContext-- its By default support Aggresive loading.


  1. As per my experience, always prefer ApplicationContext over BeanFactory, there is absolutely no reason to use later.

  2. Thanks for feedback but here we are only showing difference between BeanFactory and ApplicationContext..

  3. As I know

    BeanFactory: Use Only when Resources are Crucial
    The root interface for accessing a Spring bean container

    ApplicationContext : we should generally use it.
    Subinterface of BeanFactory

  4. 1) BeanFactory container is defined by the BeanFactory interface.
    Whereas ApplicationContext container is defined by the ApplicationContext interface.
    2) BeanFactory container is used for light weight applications.
    Whereas ApplicationContext container is used for heavy weight applications.

    Let me know if I am wrong. Thank you :)

  5. The main difference between these two containers is how singleton beans are loaded. A bean factory lazily loads all beans, deferring bean creation until the getBean() method is called. An application context preloads all singleton beans upon context startup. By preloading singleton beans, you ensure that they will be ready to use when needed—your application won’t have to wait for them to be created.

  6. This comment has been removed by the author.

    1. This comment has been removed by the author.

  7. Thanks Remesh ��

  8. Bean factory supports annotations by using manual registering bean post processor

  9. Nice Info Regarding Bean Factory and application context in spring my sincere thanks for sharing this post Please Continue to share this post
    Java Training in Chennai

    1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training in India . Nowadays Java has tons of job opportunities on various vertical industry.

      or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry.

  10. nice blog has been shared by you. before i read this blog i didn't have any knowledge about this but now i got some knowledge. so keep on sharing such kind of an interesting blogs.
    Aws Training in Bangalore

  11. Nice Info Regarding Bean Factory and application context in spring my sincere thanks for sharing this post Please Continue to share this post
    devops training in chennai

  12. really awesome blog thanks for sharing

  13. Thanks a lot very much for the high quality and results-oriented help.
    I won’t think twice to endorse your blog post to anybody who wants
    and needs support about this area.

    aws training in bangalore

    aws training in chennai

  14. Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp great deal more around this condition.
    python training in chennai

  15. And indeed, I’m just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I’ve had.
    dotnet training in chennai

  16. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site. angularjs training in chennai

  17. Wow! This is the perfect blog I am looking this type of blog its awesome blog here , share great information about this topic. This informative blog helps many readers with their decision-making regarding the situation. Great articles and will look forward for more!
    Online IT Training Self Placed Videos

    Sales Force Training Self Placed Videos

    My Sql Training Self Placed Videos

    Tableau Training Self Placed Videos

  18. This comment has been removed by the author.

  19. great and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.
    Salesforce Online Training

    SAP ABAP Online Training

    SAP Basis Online Training

    SAP CS Online Training

  20. This blog gives very important info about bi Tools Thanks for sharing, learn more about BI Tools like Tableau Online Course