增加对应本地开发的profile:local,修改涉及此的profile设置

master
李一帆 2025-04-07 15:22:51 +08:00
parent 1fd47cae72
commit d6d8dc1c93
6 changed files with 57 additions and 6 deletions

View File

@ -1,14 +1,14 @@
services:
xyt:
image: openjdk:21
container_name: xyt
restart: always
container_name: tsg
restart: no
network_mode: host
volumes:
- /root/gunshiApp/xyt:/app
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
- SPRING_PROFILES_ACTIVE=prod
- SPRING_PROFILES_ACTIVE=dev
- TZ=Asia/Shanghai
command: java -jar /app/gunshi-project-xyt-1.0-SNAPSHOT.jar

View File

@ -57,7 +57,7 @@ import java.util.stream.Collectors;
@EnableScheduling//开启定时任务
@Component
@Slf4j
// @Profile("prod")
@Profile({"prod","dev"})
public class DataTaskTSG {
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

View File

@ -45,7 +45,7 @@ import java.util.stream.Collectors;
@EnableScheduling//开启定时任务
@Component
@Slf4j
//@Profile("prod")
@Profile({"prod","dev"})
public class PaDataTask {
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

View File

@ -2,5 +2,5 @@ spring:
config:
import:
- config-common.yml
- config-dev.yml
- config-local.yml
- config-ruoyi.yml

View File

@ -0,0 +1,6 @@
spring:
config:
import:
- config-common.yml
- config-dev.yml
- config-ruoyi.yml

View File

@ -0,0 +1,45 @@
spring:
profiles:
active: dev
datasource:
dynamic:
datasource:
master:
url: jdbc:postgresql://10.0.41.112:5432/tanshugang?stringtype=unspecified
username: gunshiiot
password: 1234567a
driver-class-name: org.postgresql.Driver
access-logging:
url: jdbc:postgresql://10.0.41.112:5432/tanshugang
username: gunshiiot
password: 1234567a
driver-class-name: org.postgresql.Driver
data:
redis:
host: 10.0.41.112
port: 6379
password: 1234567a
database: 4
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
gunshi:
file:
key: 6gaWRs4bz4mxpXXxgZF4
secret: 3QFbff974hVwpH6laAondq33iShpzs6YG4XsrTRT
endpoint: http://223.75.53.141:9100
publicBucket: gs-tsg
loginBucket: gs-tsg
privateBucket: gs-tsg
# 洪水预测数据库连接信息
algorithem:
datasource:
url: jdbc:postgresql://10.0.41.112:5432/tanshugang?stringtype=unspecified
username: gunshiiot
password: 1234567a
driver-class-name: org.postgresql.Driver
jcskPath: http://223.75.53.124:8002/shareddata/api/v1/monitdata
jcskToken: FB1EE57468E0CB9A51306F9056A534778235BF27CBDCB8546B7EABA6FB72BBCBEE4BB01A9CBD8C3899E682C67167C02D81FDABD21639DE2655EB4EE567391899