Modified application.properties

The application.properties file is used to connect the database with the application and define how the database will behave. Here is the code for application.properties:

# ===============================
# DATABASE
# ===============================

spring.datasource.url=jdbc:mysql://localhost:3306/my_app_schema?useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=12345678

# ===============================
# JPA / HIBERNATE
# ===============================
spring.jpa.show-sql=true

# Hibernate ddl auto (create, create-drop, validate, update)
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.MySQL5Dialect

Here we have used the database named my_app, and the schema is my_app_schema. We disable useSSL with useSSL=false, and to retrieve the public key we use allowPublicKeyRetrieval=true.

Here, we use spring.jpa.hibernate.ddl-auto = update, which means after restarting your server the data won't be lost.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.172.38