Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Antonio Rueda
/
UJACoin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
75bdca43
authored
Sep 27, 2021
by
Antonio Rueda
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Cambios menores
parent
3e59c914
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
src/main/java/es/ujaen/dae/ujacoin/entidades/Cliente.java
src/main/resources/application.yml
src/test/java/es/ujaen/dae/ujacoin/controladoresREST/ControladorRESTTest.java
src/main/java/es/ujaen/dae/ujacoin/entidades/Cliente.java
View file @
75bdca43
...
@@ -44,6 +44,7 @@ public class Cliente implements Serializable {
...
@@ -44,6 +44,7 @@ public class Cliente implements Serializable {
/** Dirección del domicilio */
/** Dirección del domicilio */
@NotBlank
@NotBlank
String
direccion
;
String
direccion
;
/** Teléfono */
/** Teléfono */
@NotNull
@NotNull
@Size
(
min
=
9
,
max
=
13
)
@Size
(
min
=
9
,
max
=
13
)
...
...
src/main/resources/application.yml
View file @
75bdca43
...
@@ -4,7 +4,7 @@ spring.datasource.url: jdbc:mysql://localhost:33060/ujacoin
...
@@ -4,7 +4,7 @@ spring.datasource.url: jdbc:mysql://localhost:33060/ujacoin
spring.datasource.username
:
ujacoin
spring.datasource.username
:
ujacoin
spring.datasource.password
:
secret
spring.datasource.password
:
secret
spring.jpa.properties.javax.persistence.schema-generation.database.action
:
non
e
spring.jpa.properties.javax.persistence.schema-generation.database.action
:
drop-and-creat
e
spring.data.jpa.repositories.bootstrap-mode
:
default
spring.data.jpa.repositories.bootstrap-mode
:
default
...
...
src/test/java/es/ujaen/dae/ujacoin/controladoresREST/ControladorRESTTest.java
View file @
75bdca43
...
@@ -69,7 +69,7 @@ public class ControladorRESTTest {
...
@@ -69,7 +69,7 @@ public class ControladorRESTTest {
"jeegmail.com"
,
"jeegmail.com"
,
"clave"
);
"clave"
);
TestRestTemplate
restTemplate
=
new
TestRestTemplate
(
restTemplateBuilder
);
TestRestTemplate
restTemplate
=
new
TestRestTemplate
(
restTemplateBuilder
);
ResponseEntity
<
DTOCuenta
>
respuesta
=
restTemplate
.
postForEntity
(
ResponseEntity
<
DTOCuenta
>
respuesta
=
restTemplate
.
postForEntity
(
"/clientes"
,
"/clientes"
,
cliente
,
cliente
,
...
@@ -156,7 +156,7 @@ public class ControladorRESTTest {
...
@@ -156,7 +156,7 @@ public class ControladorRESTTest {
).
getBody
();
).
getBody
();
TestRestTemplate
restTemplateAutenticado
=
new
TestRestTemplate
(
restTemplateBuilder
.
basicAuthentication
(
cliente
.
getDni
(),
cliente
.
getClave
()));
TestRestTemplate
restTemplateAutenticado
=
new
TestRestTemplate
(
restTemplateBuilder
.
basicAuthentication
(
cliente
.
getDni
(),
cliente
.
getClave
()));
// Acceso con credenciales del primer cliente a la información del segundo
// Acceso con credenciales del primer cliente a la información del segundo
ResponseEntity
<
DTOCliente
>
respuestaLogin
=
restTemplateAutenticado
ResponseEntity
<
DTOCliente
>
respuestaLogin
=
restTemplateAutenticado
.
getForEntity
(
.
getForEntity
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment