Last active
June 24, 2024 13:30
-
-
Save rafaelpontezup/e4765384523b5e64296549cfd000eeda to your computer and use it in GitHub Desktop.
Controller with a single-line method
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
@RestController | |
class CustomerController { | |
@Autowired | |
private CustomerService service; | |
@PostMapping("/api/customers") | |
public void create(@Valid @RequestBody CustomerRequest request) { | |
service.save(request); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment