Created
November 28, 2016 09:25
-
-
Save AntonioDiaz/8f059c347ed60d595cd47bcb8294123d to your computer and use it in GitHub Desktop.
minimun Spring MVC controller
This file contains 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
package com; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.ui.ModelMap; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
@Controller | |
public class MyController { | |
@RequestMapping(value="/helloWeb", method=RequestMethod.GET) | |
public String wellcomePage(ModelMap modelMap) { | |
modelMap.addAttribute("message", "Spring 3 MVC Hello World"); | |
return "hello"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment