修改dokcer文件

This commit is contained in:
2025-07-06 17:19:51 +08:00
parent bad0a02d30
commit e7c4739462
3 changed files with 8 additions and 8 deletions

8
Jenkinsfile vendored
View File

@ -4,7 +4,7 @@ pipeline {
maven 'M3'
}
environment {
APP_NAME = "sczx-gateway"
APP_NAME = "sczx_gateway"
DOCKER_IMAGE = "${APP_NAME}:latest"
CONTAINER_NAME = "${APP_NAME}-container"
}
@ -50,9 +50,9 @@ pipeline {
steps {
echo "🛑 正在停止旧容器..."
sh '''
if [ "$(docker ps -f 'name=sczx-gateway-container' --format '{{.Status}}')" ]; then
docker stop sczx-gateway-container
docker rm sczx-gateway-container
if [ "$(docker ps -f 'name=sczx_gateway-container' --format '{{.Status}}')" ]; then
docker stop sczx_gateway-container
docker rm sczx_gateway-container
fi
'''
}

View File

@ -5,11 +5,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.sczx</groupId>
<artifactId>sczx-gateway</artifactId>
<artifactId>sczx_gateway</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>sczx-gateway</name>
<name>sczx_gateway</name>
<description>统一 API 网关服务</description>
<properties>
@ -100,7 +100,7 @@
<!-- Build Configuration -->
<build>
<finalName>sczx-gateway</finalName>
<finalName>sczx_gateway</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>

View File

@ -4,7 +4,7 @@ server:
spring:
application:
name: sczx-gateway
name: sczx_gateway
cloud:
gateway:
discovery: