samedi 30 septembre 2017

IOC principle - Servlet Container Vs Spring IOC container

IOC can be implemented, using either:

  • Dependency Injection

  • Service locator pattern


Spring IOC container follow IOC principle using Dependency injection, where implementations can be injected at runtime as constructor-based or setter-based

Servlet container(Ex: Apache tomcat) follow IOC principle to pick servlet class implementation based on the configured data given in web.xml with url pattern matching rules.


The purpose of both containers differ. But,

What design pattern does servlet container follow to implement IOC principle?

Aucun commentaire:

Enregistrer un commentaire