Skip to content

Commit

Permalink
gg
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrzz98 committed Feb 7, 2023
1 parent c46ca12 commit 82e836a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

@RestController
@RequiredArgsConstructor
@CrossOrigin(origins = "*")
@RequestMapping("/clientes")
@CrossOrigin(origins = "*")
public class ClienteController {

private final ClienteService clienteService;
Expand All @@ -27,6 +27,7 @@ public ResponseEntity<ResponseDTO> getClienteById(@RequestParam Long id){
}

@GetMapping(value = "/ci", produces = MediaType.APPLICATION_JSON)
@CrossOrigin(origins = "*")
public ResponseEntity<ResponseDTO> getClienteByCedula(@RequestParam String ci){
return clienteService.getClienteByCedula(ci).build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

@RestController
@RequiredArgsConstructor
@CrossOrigin(origins = "*")
@RequestMapping("/empleados")
@CrossOrigin(origins = "*")
public class EmpleadoController {

private final EmpleadoService empleadoService;
Expand All @@ -27,6 +27,7 @@ public ResponseEntity<ResponseDTO> getEmpleadoById(@RequestParam Long id){
}

@GetMapping(value = "/ci", produces = MediaType.APPLICATION_JSON)
@CrossOrigin(origins = "*")
public ResponseEntity<ResponseDTO> getEmpleadoByCedula(@RequestParam String ci){
return empleadoService.getEmpleadoByCedula(ci).build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class Empleado {
@Column(name = "APELLIDO")
private String apellido;
@NotNull
@Column(name = "CEDULA")
@Column(name = "CEDULA", unique = true)
private String cedula;

@Column(name = "TELEFONO")
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ spring.jpa.show-sql=true
spring.datasource.url=jdbc:mysql://z3iruaadbwo0iyfp.cbetxkdyhwsb.us-east-1.rds.amazonaws.com:3306/p63xdnex49r124ub
spring.datasource.username=ddgbsu830icdyd4t
spring.datasource.password=gggf144b0aai7kqa
spring.jpa.hibernate.ddl-auto=validate
spring.jpa.hibernate.ddl-auto=create
spring.jpa.properties.hibernate.format_sql=true


Expand All @@ -18,4 +18,4 @@ spring.jpa.properties.hibernate.format_sql=true
#spring.jpa.properties.hibernate.format_sql=true


#mysql://ddgbsu830icdyd4t:gggf144b0aai7kqa@z3iruaadbwo0iyfp.cbetxkdyhwsb.us-east-1.rds.amazonaws.com:3306/p63xdnex49r124ub
#mysql://ddgbsu830icdyd4t:gggf144b0aai7kqa@z3iruaadbwo0iyfp.cbetxkdyhwsb.us-east-1.rds.amazonaws.com:3306/p63xdnex49r124ub

0 comments on commit 82e836a

Please sign in to comment.