package study.springboot.starter.restapi.controllers;

import java.util.Map;

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

@Controller
@RequestMapping("/examples")
public class ExampleController {
	@RequestMapping("/")
	public String index(Map<String, Object> model){
		return "";
	}
	
	@RequestMapping(value="/{id}",method=RequestMethod.GET)
	public String view(Map<String, Object> model,@PathVariable("id")Long id){
		return "";
	}
	
	@RequestMapping(value="/new",method=RequestMethod.GET)
	public String newForm(Map<String, Object> model){
		return "";
	}
	
	@RequestMapping(value="/",method=RequestMethod.POST)
	public String create(Map<String, Object> model){
		return "";
	}
	
	@RequestMapping(value="/{id}/edit",method=RequestMethod.GET)
	public String editForm(Map<String, Object> model,@PathVariable("id")Long id){
		return "";
	}
	
	@RequestMapping(value="/{id}/",method=RequestMethod.POST)
	public String update(Map<String, Object> model){
		return "";
	}
	
	@RequestMapping(value="/{id}/delete",method=RequestMethod.POST)
	public String delete(Map<String, Object> model){
		return "";
	}

  @RequestMapping(value="/delete",method=RequestMethod.POST)
  public String deleteAll(Map<String, Object> model){
    return "";
  }
}

@@ -75,58 +75,8 @@
 p;%0A%0A
-import org.springframework.stereotype.Controller;%0A
 impo
@@ -257,18 +257,85 @@
 Method;%0A
-%0A@
+import org.springframework.web.bind.annotation.RestController;%0A%0A@Rest
 Controll

change @Controller -> @RestController for rest-api project