Dependency injection with Guice

The servlet class is very simple, as demonstrated in the following code:

package packt.java11.mastermind.servlet; import; import; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import; public class Mastermind extends HttpServlet { private static final Logger log = LoggerFactory.getLogger(Mastermind.class); public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } public void ...

Get Java Projects - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.