build(biji-houdaun): 配置生产环境并优化构建流程
- 新增 production环境配置文件 application-prod.yml - 更新 Dockerfile,设置生产环境变量 - 为 Knife4j 配置添加环境限制,仅在非生产环境激活 - 在 pom.xml 中添加开发和生产环境配置 - 更新编译打包命令文档,增加生产环境构建指令
This commit is contained in:
@@ -174,4 +174,33 @@
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
|
||||
<profiles>
|
||||
<!-- 开发环境包含Knife4j -->
|
||||
<profile>
|
||||
<id>dev</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<!-- Knife4j API 文档 -->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||
<version>2.7.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
|
||||
<!-- 生产环境不包含Knife4j -->
|
||||
<profile>
|
||||
<id>prod</id>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user