package net.furikuri;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TodoController {

    @Autowired
    private TodoRepository repository;

    @RequestMapping("/")
    public List<Todo> getAll() {
        return repository.findAll();
    }
}

@@ -133,23 +133,145 @@
 .Request
-Mapping
+Body;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RequestMethod
 ;%0Aimport
@@ -554,11 +554,165 @@
 );%0A    %7D
+%0A%0A    @RequestMapping(value = %22/%22, method = RequestMethod.POST)%0A    public Todo save(@RequestBody Todo todo) %7B%0A        return repository.save(todo);%0A    %7D
 %0A%7D%0A

Add endpoint for saving todo