Skip to content

Instantly share code, notes, and snippets.

@rei999
Created January 19, 2013 20:15
Show Gist options
  • Save rei999/4574829 to your computer and use it in GitHub Desktop.
Save rei999/4574829 to your computer and use it in GitHub Desktop.
sample hello spring controller
package com.yournamespace.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@RequestMapping(value="/hello")
public class HelloContoller {
@RequestMapping(value="", method = RequestMethod.GET)
public String sayHello() {
return "hello_world";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment