domingo, 3 de julio de 2022

Conectar proyecto Spring Boot con MySql y PostgreSQL

Configurar la Conexión a la Base de datos:

MySQL connection settings
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/testdb?serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=secret
# JPA settings
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect


--------------------------------------------------------------------------------------------
# Postgresql connection settings
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost/testdb
spring.datasource.username=postgres
spring.datasource.password=secret
# JPA settings
spring.jpa.database=postgresql
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect


Opcional:
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true

No hay comentarios:

Publicar un comentario

Actualizar TailwindCSS a la version 4 en Laravel

Actualizar TailwindCSS a la version 4 en Laravel npx @tailwindcss/upgrade En el archivo vite.config.ts Agregar el plugin de tailwindcss impo...