“Aplicación de arranque de primavera mysql.properties” Código de respuesta

Propiedades de aplicación de primavera MySQL JPA

spring.datasource.url=jdbc:mysql://localhost:yourDatabase?serverTimezone=UTC
//set username and password as environment variables under application configuration so that the real ones won't be pushed to github, only their aliases: USERNAME and PASSWORD in this case. 
spring.datasource.username=${USERNAME} // instead of ${USERNAME} you may use a generic one as well, like 'root' but then it will be pushed to github with the app so anyone can see you username and password.
spring.datasource.password=${PASSWORD}
spring.jpa.hibernate.ddl-auto=create-drop //running after the first time (when the tables are created in the database) or later when you want the data remain for later tests you have to change the key word 'create-drop' to 'update' so that the data remains in place. Oops! the database itself without the tables needs to be created manually first.
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
spring.logging.level.org.hibernate.SQL=debug
spring.jpa.show-sql=true
Uptight Unicorn

Aplicación de arranque de primavera mysql.properties

spring.datasource.url=jdbc:mysql://localhost:3306/myDb
spring.datasource.username=user1
spring.datasource.password=pass
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
Impossible Ibis

Configurar mysql usando las propiedades de arranque de primavera

spring.datasource.url=jdbc:mysql://localhost:3306/javadevjournal
spring.datasource.username=javadevjournal
spring.datasource.password=ThePassword
spring.jpa.hibernate.ddl-auto=update

## Hibernate Properties
# The SQL dialect makes Hibernate generate better SQL for the chosen database
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
Impossible Impala

Respuestas similares a “Aplicación de arranque de primavera mysql.properties”

Preguntas similares a “Aplicación de arranque de primavera mysql.properties”

Más respuestas relacionadas con “Aplicación de arranque de primavera mysql.properties” en Sql

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código