Created
November 24, 2017 14:11
-
-
Save apuravchauhan/cb4d02315571c97885fcb3e4a97eaa9c to your computer and use it in GitHub Desktop.
Sample URL exposed
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.apuravchauhan.web.controller; | |
import javax.servlet.http.HttpServletRequest; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.servlet.ModelAndView; | |
/** | |
* | |
* @author apuravchauhan | |
* | |
*/ | |
@Controller | |
public class HelloController { | |
@RequestMapping("/") | |
public ModelAndView sayHello(HttpServletRequest request) { | |
request.getSession(true); | |
ModelAndView model = new ModelAndView("hello"); | |
model.addObject("msg", "Apurav Chauhan"); | |
return model; | |
} | |
@RequestMapping("/redirect") | |
public String redirect() { | |
return "redirect:/"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment