Created
November 3, 2011 14:02
-
-
Save aziz781/1336551 to your computer and use it in GitHub Desktop.
Java Spring Controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ok