Skip to content

Instantly share code, notes, and snippets.

@bartprokop
Created November 22, 2013 23:02
Show Gist options
  • Save bartprokop/7608366 to your computer and use it in GitHub Desktop.
Save bartprokop/7608366 to your computer and use it in GitHub Desktop.
package com.appspot.bartgaepoc;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.ApplicationContext;
@Configurable
public class SomeServlet extends HttpServlet {
@Autowired
private ApplicationContext applicationContext;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
resp.getWriter().println(applicationContext);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment