package controller.rest.publ;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/rest/publ")
public class HelloRest {

	public HelloRest() {
		super();
	}

	@RequestMapping(value = "/post", method = RequestMethod.POST)
	@ResponseBody
	public String createBook(@RequestBody String body) {
		return String.format("Hello POST by %s", body);
	}

}

@@ -28,58 +28,8 @@
 l;%0A%0A
-import org.springframework.stereotype.Controller;%0A
 impo
@@ -263,21 +263,27 @@
 .Res
-ponseBody;%0A%0A@
+tController;%0A%0A@Rest
 Cont
@@ -449,23 +449,8 @@
 ST)%0A
-%09@ResponseBody%0A
 %09pub

change to RestController