chore(server): enable pay/mall modules and local compose/flyway setup

This commit is contained in:
2026-08-01 12:19:53 +08:00
parent a841652fd4
commit 6db64917a2
6 changed files with 123 additions and 34 deletions

View File

@@ -58,12 +58,12 @@
<!-- <artifactId>yudao-module-bpm</artifactId>-->
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<!-- 支付服务。默认注释,保证编译速度 -->
<!-- <dependency>-->
<!-- <groupId>cn.iocoder.boot</groupId>-->
<!-- <artifactId>yudao-module-pay</artifactId>-->
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<!-- 支付服务:教育商业化直接复用原生 Pay 能力 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-pay</artifactId>
<version>${revision}</version>
</dependency>
<!-- 微信公众号模块。默认注释,保证编译速度 -->
<!-- <dependency>-->
@@ -73,21 +73,21 @@
<!-- </dependency>-->
<!-- 商城相关模块。默认注释,保证编译速度-->
<!-- <dependency>-->
<!-- <groupId>cn.iocoder.boot</groupId>-->
<!-- <artifactId>yudao-module-product</artifactId>-->
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>cn.iocoder.boot</groupId>-->
<!-- <artifactId>yudao-module-promotion</artifactId>-->
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>cn.iocoder.boot</groupId>-->
<!-- <artifactId>yudao-module-trade</artifactId>-->
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-product</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-promotion</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-trade</artifactId>
<version>${revision}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>cn.iocoder.boot</groupId>-->
<!-- <artifactId>yudao-module-statistics</artifactId>-->
@@ -143,10 +143,24 @@
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<!-- 本地开发 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-docker-compose</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- 数据库迁移 -->
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-flyway</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>

View File

@@ -3,6 +3,10 @@ server:
--- #################### 数据库相关配置 ####################
spring:
docker:
compose:
file: ../compose.yaml
lifecycle-management: start-and-stop
autoconfigure:
# noinspection SpringBootApplicationYaml
exclude:
@@ -26,9 +30,9 @@ spring:
flyway:
enabled: true
url: ${FLYWAY_URL:${spring.datasource.dynamic.datasource.master.url}}
user: ${FLYWAY_USER}
password: ${FLYWAY_PASSWORD}
locations: classpath:db/migration
user: ${FLYWAY_USER:yudao_flyway}
password: ${FLYWAY_PASSWORD:123456}
locations: classpath:db/migration,classpath:db/local
table: flyway_schema_history
baseline-on-migrate: true
baseline-version: 4009
@@ -75,14 +79,14 @@ spring:
primary: master
datasource:
master:
url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro
username: root
password: 123456
url: ${MASTER_DATASOURCE_URL:jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro}
username: ${MASTER_DATASOURCE_USERNAME:yudao_runtime}
password: ${MASTER_DATASOURCE_PASSWORD:123456}
slave: # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro
username: root
password: 123456
url: ${SLAVE_DATASOURCE_URL:${spring.datasource.dynamic.datasource.master.url}}
username: ${SLAVE_DATASOURCE_USERNAME:${spring.datasource.dynamic.datasource.master.username}}
password: ${SLAVE_DATASOURCE_PASSWORD:${spring.datasource.dynamic.datasource.master.password}}
# tdengine: # IoT 数据库(需要 IoT 物联网再开启噢!)
# lazy: true # 开启懒加载,保证启动速度
# url: jdbc:TAOS-WS://127.0.0.1:6041/ruoyi_vue_pro?varcharAsString=true&enableAutoReconnect=true # 参见https://t.zsxq.com/qaX9c开启 TDengine WebSocket 自动重连

View File

@@ -0,0 +1,10 @@
GRANT USAGE ON SCHEMA public TO yudao_runtime;
GRANT SELECT, INSERT, UPDATE, DELETE, TRUNCATE ON ALL TABLES IN SCHEMA public TO yudao_runtime;
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO yudao_runtime;
REVOKE ALL ON TABLE
education_question_lifecycle_transition_token,
education_content_node_lifecycle_transition_token,
education_question_collection_lifecycle_transition_token,
education_question_collection_membership_token
FROM yudao_runtime;