Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Adrian
/
EjemploDAE2020
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
4bc11b37
authored
Nov 16, 2020
by
Adrian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Añadida conexión ejemplo MySQL y arreglados bugs
parent
ef673668
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
6 deletions
pom.xml
src/main/java/es/ujaen/dae/ujacoin/beans/RepositorioCuentas.java
src/main/java/es/ujaen/dae/ujacoin/beans/RepositorioTarjetas.java
src/main/java/es/ujaen/dae/ujacoin/beans/ServicioUjaBankImpl.java
src/main/resources/application.properties
pom.xml
View file @
4bc11b37
...
...
@@ -35,6 +35,12 @@
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
...
...
src/main/java/es/ujaen/dae/ujacoin/beans/RepositorioCuentas.java
View file @
4bc11b37
...
...
@@ -45,7 +45,6 @@ public class RepositorioCuentas {
public
List
<
Cuenta
>
listarCuentasPorCliente
(
Cliente
cliente
)
{
em
.
merge
(
cliente
);
cliente
.
getTarjetasAsociadas
();
return
new
ArrayList
<>(
cliente
.
getCuentasAsociadas
().
values
());
}
...
...
src/main/java/es/ujaen/dae/ujacoin/beans/RepositorioTarjetas.java
View file @
4bc11b37
...
...
@@ -44,7 +44,6 @@ public class RepositorioTarjetas {
public
List
<
Tarjeta
>
listarTarjetasPorCliente
(
Cliente
cliente
)
{
em
.
merge
(
cliente
);
cliente
.
getTarjetasAsociadas
();
return
new
ArrayList
<>(
cliente
.
getTarjetasAsociadas
().
values
());
}
...
...
src/main/java/es/ujaen/dae/ujacoin/beans/ServicioUjaBankImpl.java
View file @
4bc11b37
...
...
@@ -79,8 +79,7 @@ public class ServicioUjaBankImpl implements ServicioUjaBank {
@Override
@Transactional
public
ArrayList
<
Tarjeta
>
listaTarjetas
(
Cliente
cliente
)
{
repoClientes
.
actualizar
(
cliente
);
cliente
.
getTarjetasAsociadas
();
Cliente
clienteEnlazado
=
repoClientes
.
em
.
merge
(
cliente
);
return
new
ArrayList
<>(
cliente
.
getTarjetasAsociadas
().
values
());
}
...
...
@@ -97,14 +96,12 @@ public class ServicioUjaBankImpl implements ServicioUjaBank {
}
@Override
@Transactional
public
void
ingreso
(
Cuenta
cuenta
,
Tarjeta
tarjeta
,
float
importe
)
{
//cuenta.ingreso(tarjeta, importe);
}
@Override
@Transactional
public
void
reintegro
(
Cuenta
cuenta
,
Tarjeta
tarjeta
,
float
importe
)
{
// cuenta.reintegro(tarjeta, importe);
...
...
src/main/resources/application.properties
View file @
4bc11b37
#SQLite
spring.jpa.database-platform
=
com.springboot.sqlite.SQLDialect
spring.jpa.hibernate.ddl-auto
=
update
...
...
@@ -6,3 +7,12 @@ spring.datasource.driver-class-name = org.sqlite.JDBC
spring.datasource.username
=
spring.datasource.password
=
#MySQL
#spring.jpa.hibernate.ddl-auto= update
#spring.datasource.url = jdbc:mysql://176.31.162.158:3306/DAE2020GX
#spring.datasource.driver-class-name = com.mysql.cj.jdbc.Driver
#spring.datasource.username = DAE2020GX
#
spring.datasource.password
=
DAE2020GX
\ No newline at end of file
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