2
respostas

Saída do console diferente da do professor

Olá pessoal, podem me ajudar? a saída do console está diferente da do professor, está assim a minha:

dez 28, 2020 12:54:26 PM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation INFO: HHH000204: Processing PersistenceUnitInfo [name: alura] dez 28, 2020 12:54:26 PM org.hibernate.Version logVersion INFO: HHH000412: Hibernate Core {5.4.10.Final} dez 28, 2020 12:54:26 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager INFO: HCANN000001: Hibernate Commons Annotations {5.1.0.Final} dez 28, 2020 12:54:27 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!) Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. dez 28, 2020 12:54:27 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator INFO: HHH10001005: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost/alura_jpa?useTimezone=true&serverTimezone=UTC] dez 28, 2020 12:54:27 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator INFO: HHH10001001: Connection properties: {password=****, user=root} dez 28, 2020 12:54:27 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator INFO: HHH10001003: Autocommit mode: false dez 28, 2020 12:54:27 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections INFO: HHH000115: Hibernate connection pool size: 20 (min=1) dez 28, 2020 12:54:27 PM org.hibernate.dialect.Dialect INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect dez 28, 2020 12:54:28 PM org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl getIsolatedConnection INFO: HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@61ab89b0] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode. Hibernate:

alter table Conta 
   add column saldo double precision
2 respostas

(continuando porque não deu para colocar tudo no resto):

dez 28, 2020 12:54:29 PM org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator initiateService INFO: HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] Hibernate: insert into Conta (agencia, numero, saldo, titular) values (?, ?, ?, ?)

Process finished with exit code 0

Porém é inserido no banco de dados, porém essa não é a saída do console esperada, podem me auxiliar?

Segue meu repositório com o código todo:

https://github.com/JulianaOnofrio/projeto-jpa

Oi, Juliana Onofrio.

Conferi a saida do seu console e parece que o nome da classe JDBC que usa está deprecado tente mudar no application.properties de :


spring.datasource.driver-class-name=com.mysql.jdbc.Driver

para

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

Espero que tenha ajudado!