-
-
Save dvallin/0e57eb4f963dcf2915cf8892f71127e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
@Validated | |
public class TasksService { | |
@Autowired | |
private TaskRepository repository; | |
public Flux<Task> list() { | |
return repository.findAll(); | |
} | |
public Mono<Task> addTask(@NotNull AddTask command) { | |
return repository.insert(new Task(command.title)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment