Last active
March 12, 2020 23:59
-
-
Save gdonega/c0091ee1681818aae3f127f2d2dffd21 to your computer and use it in GitHub Desktop.
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 com.testes.spring.exemplo.empresas.rest; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.PostMapping; | |
import org.springframework.web.bind.annotation.RequestBody; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
import com.testes.spring.exemplo.empresas.dtos.CnpjDto; | |
import com.testes.spring.exemplo.empresas.services.EmpresaEnvelopeService; | |
@RestController | |
@RequestMapping("/rest/empresa-envelope") | |
public class EmpresaEnvelopeController { | |
@Autowired | |
private EmpresaEnvelopeService service; | |
@PostMapping | |
public ResponseEntity<Object> salvarCnpj(@RequestBody CnpjDto cnpjDto) { | |
service.salvarCnpj(cnpjDto.getCnpj()); | |
return ResponseEntity.ok().build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment