mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-10-26 06:57:08 +08:00
ci: 👷 调整项目打包结构,分离依赖、配置文件
1.调整 Spring Boot 配置文件到 config 目录 2.移除 Maven Profiles 配置 3.调整项目打包结构,分离依赖、配置文件。如无依赖调整,部署时仅需拷贝程序包,且更方便进行配置修改 4.调整后的项目打包结构,更贴合部署安装程序结构,例如:Tomcat 安装包、Maven 安装包 5.建议在 bin 目录上一级执行程序,以使日志文件能正确生成在 logs 目录下,参考 Dockerfile
This commit is contained in:
45
pom.xml
45
pom.xml
@@ -68,33 +68,6 @@ limitations under the License.
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>dev</id>
|
||||
<!-- 自定义属性配置 -->
|
||||
<properties>
|
||||
<!-- Spring Boot 启用环境 -->
|
||||
<profiles.active>dev</profiles.active>
|
||||
<!-- 日志级别 -->
|
||||
<logging.level>DEBUG</logging.level>
|
||||
<!-- 日志存储位置 -->
|
||||
<logging.file.path>./logs</logging.file.path>
|
||||
</properties>
|
||||
<activation>
|
||||
<!-- 默认启用 -->
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>prod</id>
|
||||
<properties>
|
||||
<profiles.active>prod</profiles.active>
|
||||
<logging.level>INFO</logging.level>
|
||||
<logging.file.path>./logs</logging.file.path>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<!-- 全局依赖版本管理 -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
@@ -287,24 +260,6 @@ limitations under the License.
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
</includes>
|
||||
<!-- 启用过滤,即替换对应资源中的变量 -->
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
<!-- 除 YAML 配置文件外,其他配置文件不需要进行变量替换 -->
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
<!-- 远程仓库配置:阿里云 Maven 中央仓库(公共代理仓库,Central 仓和 JCenter 仓的聚合仓,帮助研发人员提高研发生产效率,使用阿里云 Maven 中央仓库作为下载源,速度更快更稳定) -->
|
||||
|
||||
Reference in New Issue
Block a user