Browse Source

8.4打包配置

huangqizheng/feature-20250804114811-打包配置
huangqizhen 2 weeks ago
parent
commit
60091a7aeb
  1. 53
      pom.xml
  2. 8
      src/main/resources/application-dev.yml
  3. 17
      src/main/resources/application-test.yml
  4. 2
      src/main/resources/application.yml

53
pom.xml

@ -120,23 +120,6 @@
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.5.2</version> <!-- 版本号可根据实际情况调整 -->
</dependency>
<!-- <dependency>-->
<!-- <groupId>io.jsonwebtoken</groupId>-->
<!-- <artifactId>jjwt-api</artifactId>-->
<!-- <version>0.11.5</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>io.jsonwebtoken</groupId>-->
<!-- <artifactId>jjwt-impl</artifactId>-->
<!-- <version>0.11.5</version>-->
<!-- <scope>runtime</scope>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>io.jsonwebtoken</groupId>-->
<!-- <artifactId>jjwt-jackson</artifactId> &lt;!&ndash; 或 jjwt-gson &ndash;&gt;-->
<!-- <version>0.11.5</version>-->
<!-- <scope>runtime</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
@ -177,7 +160,43 @@
</dependency>
</dependencies>
<!--配置多环境打包-->
<profiles>
<!--开发环境-->
<profile>
<id>dev</id>
<properties>
<!--自定义的属性-->
<spring.profiles.active>dev</spring.profiles.active>
</properties>
<activation>
<!--如果不指定,则默认使用dev开发环境配置-->
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 测试环境-->
<profile>
<id>test</id>
<properties>
<spring.profiles.active>test</spring.profiles.active>
</properties>
</profile>
<!--生产环境-->
<profile>
<id>prod</id>
<properties>
<spring.profiles.active>pro</spring.profiles.active>
</properties>
</profile>
</profiles>
<build>
<finalName>${project.name}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

8
src/main/resources/application-dev.yml

@ -12,9 +12,9 @@ spring:
pool-name: mysql1HikariCP
maximum-pool-size: 10
sqlserver1:
jdbc-url: jdbc:sqlserver://52.76.43.43:1433;databaseName=hwhcGold;encrypt=true;sslProtocol=TLSv1;trustServerCertificate=true;
username: hwhc_gold_query
password: hwhc_gold_query4564jkj
jdbc-url: jdbc:sqlserver://54.255.120.171:1433;databaseName=hwhcGold;encrypt=true;sslProtocol=TLSv1;trustServerCertificate=true;
username: newkst_test
password: ahsjdh#$gas6545
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
application:
@ -54,7 +54,7 @@ feishu:
bean:
url: http://39.101.133.168:8828/hljwgo/api/wallet/recharge
server:
port: 8081
port: 10704
logging:
level:

17
src/main/resources/application-test.yml

@ -12,9 +12,9 @@ spring:
pool-name: mysql1HikariCP
maximum-pool-size: 10
sqlserver1:
jdbc-url: jdbc:sqlserver://52.76.43.43:1433;databaseName=hwhcGold;encrypt=true;sslProtocol=TLSv1;trustServerCertificate=true;
username: hwhc_gold_query
password: hwhc_gold_query4564jkj
jdbc-url: jdbc:sqlserver://54.255.120.171:1433;databaseName=hwhcGold;encrypt=true;sslProtocol=TLSv1;trustServerCertificate=true;
username: newkst_test
password: ahsjdh#$gas6545
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
application:
@ -34,10 +34,10 @@ spring:
data:
redis:
database: 1
host: localhost
port: 6379
password: 123456
database: 0
host: 18.143.76.3
port: 10703
password: Ngc0FYUTA6h3wC5J
lettuce:
pool:
@ -45,17 +45,14 @@ spring:
max-wait: -1
max-idle: 5
file:
upload:
url: http://39.101.133.168:8828/hljw/api/aws/upload
feishu:
webhook:
url: https://open.feishu.cn/open-apis/bot/v2/hook/384c78aa-8df1-498b-9c47-04e890ed9877
bean:
url: http://39.101.133.168:8828/hljwgo/api/wallet/recharge
server:
port: 8081

2
src/main/resources/application.yml

@ -1,6 +1,6 @@
spring:
profiles:
active: dev
active: @spring.profiles.active@
jackson:
deserialization:
fail-on-unknown-properties: false

Loading…
Cancel
Save