配置 application.properties

spring.profiles.active=dev

## URL user and password
spring.datasource.url = jdbc:mysql://127.0.0.1:3306/nobibi?useSSL=false&useLegacyDatetimeCode=false&serverTimezone=Asia/Taipei&characterEncoding=utf8
spring.datasource.username = root
spring.datasource.password = password

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

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

## Hibernate ddl auto (create, create-drop, validate, update)
# Difference between create and update is that, update will update your database
# if database tables are already created and will create if database tables are not created.
#
# And create will create tables of database. And if tables are already created then it will drop all the tables
# and again create tables. In this case your data would be lost.
#
# It is my personal advise to use update.
# https://stackoverflow.com/questions/16788068/hibernate-make-database-only-if-not-exists
spring.jpa.hibernate.ddl-auto=update

# https://www.javainuse.com/spring/boot-jwt
# Spring security

读取 application.properties

打包 application.properties

active:

spring boot active: