Описание тега guice-servlet

Guice's servlet extensions allow you to completely eliminate web.xml from your servlet application and take advantage of type-safe, idiomatic Java configuration of your servlet and filter components

Guice Servlet Extensions

Guice Servlet provides a complete story for use in web applications and servlet containers. Guice's servlet extensions allow you to completely eliminate web.xml from your servlet application and take advantage of type-safe, idiomatic Java configuration of your servlet and filter components.

This has advantages not only in being able to use a nicer API for configuring your web applications, but also in tying together dependency injection with web components. Meaning that your servlets and filters benefit from:

  • Constructor injection
  • Type-safe, idiomatic configuration
  • Modularization (package and distribute custom Guice Servlet libraries)
  • Guice AOP

While keeping the benefits of the standard servlet lifecycle.

References