Skip to content

Instantly share code, notes, and snippets.

@aziz781
Created November 3, 2011 14:02
Show Gist options
  • Save aziz781/1336551 to your computer and use it in GitHub Desktop.
Save aziz781/1336551 to your computer and use it in GitHub Desktop.
Java Spring Controller
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
@Controller
public class StatusController {
@RequestMapping(value = "/", method = RequestMethod.GET)
public ModelAndView getStatus() {
ModelAndView modelAndView = new ModelAndView("status");
// add model data
modelAndView.addObject("jobStatus", "OK");
modelAndView.addObject("databaseStatus", "GOOD");
return modelAndView;
}
}
@aziz781
Copy link
Author

aziz781 commented Jun 7, 2013

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment