- 添加docker环境变量配置文件包含数据库连接信息 - 更新前端环境变量中的API基础URL地址 - 修改后端应用配置以支持环境变量读取数据库配置 - 在Docker Compose中添加环境变量传递和env_file支持 - 配置生产环境下的MySQL数据源和MyBatis-Plus设置 - 添加服务器镜像导入和数据库用户创建说明文档
37 lines
1.0 KiB
YAML
37 lines
1.0 KiB
YAML
spring:
|
|
datasource:
|
|
# driver-class-name: org.sqlite.JDBC
|
|
# url: jdbc:sqlite:C:\it\houtaigunli\biji\mydatabase.db
|
|
# jpa:
|
|
# hibernate:
|
|
# ddl-auto: none
|
|
# show-sql: true
|
|
# properties:
|
|
# hibernate:
|
|
# format_sql: true
|
|
# dialect: org.hibernate.dialect.SQLiteDialect
|
|
#
|
|
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
url: jdbc:mysql://panel-jp.998521.xyz:37857/biji_db?useSSL=false&serverTimezone=UTC&characterEncoding=utf8
|
|
username: biji_user
|
|
password: Ll12331100
|
|
jpa:
|
|
hibernate:
|
|
ddl-auto: update
|
|
show-sql: true
|
|
properties:
|
|
hibernate:
|
|
format_sql: true
|
|
dialect: org.hibernate.dialect.MySQLDialect
|
|
|
|
# MyBatis-Plus配置
|
|
mybatis-plus:
|
|
mapper-locations: classpath:mapper/*.xml
|
|
configuration:
|
|
map-underscore-to-camel-case: true
|
|
global-config:
|
|
db-config:
|
|
logic-delete-field: isDeleted # 全局逻辑删除的实体字段名
|
|
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
|
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0) |