Last active
August 23, 2018 03:51
-
-
Save jaocamp/6e87561bbe02e3b3aa58497e9110556a to your computer and use it in GitHub Desktop.
CQRS e Event Sourcing com Axon Framework e Spring Boot - BankAccountController.java
This file contains hidden or 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
package br.com.coderef.controller; | |
import br.com.coderef.model.BankAccount; | |
import br.com.coderef.repository.BankAccountRepository; | |
import lombok.AllArgsConstructor; | |
import lombok.extern.slf4j.Slf4j; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@Slf4j | |
@RestController | |
@AllArgsConstructor | |
@RequestMapping("/bank-accounts") | |
public class BankAccountController { | |
private BankAccountRepository repository; | |
@GetMapping | |
public ResponseEntity<Iterable<BankAccount>> getAll() { | |
return ResponseEntity.ok(repository.findAll()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment