fix: 使用Spring Boot原生sql.init自动建表
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -11,6 +11,15 @@ spring:
|
||||
url: jdbc:postgresql://${SPRING_DATASOURCE_HOST:localhost}:${SPRING_DATASOURCE_PORT:5432}/${SPRING_DATASOURCE_DB:building_materials}
|
||||
username: ${SPRING_DATASOURCE_USERNAME:postgres}
|
||||
password: ${SPRING_DATASOURCE_PASSWORD:postgres}
|
||||
hikari:
|
||||
initialization-fail-timeout: 60000
|
||||
|
||||
# 自动执行建表SQL
|
||||
sql:
|
||||
init:
|
||||
mode: always
|
||||
schema-locations: classpath:sql/init.sql
|
||||
continue-on-error: true
|
||||
|
||||
# Redis配置 - 环境变量注入
|
||||
redis:
|
||||
@@ -37,7 +46,6 @@ mybatis-plus:
|
||||
logic-delete-field: status
|
||||
logic-delete-value: 0
|
||||
logic-not-delete-value: 1
|
||||
# 自动建表
|
||||
mapper-locations: classpath*:/mapper/**/*.xml
|
||||
type-aliases-package: com.example.building.entity
|
||||
|
||||
|
||||
Reference in New Issue
Block a user