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();
    }
}

package net.furikuri;

import org.springframework.beans.factory.annotation.Autowired;
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.RestController;

import java.util.List;

@RestController
public class TodoController {

    @Autowired
    private TodoRepository repository;

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

    @RequestMapping(value = "/", method = RequestMethod.POST)
    public Todo save(@RequestBody Todo todo) {
        return repository.save(todo);
    }
}

Add endpoint for saving todo
Add endpoint for saving todo
