scripts
This commit is contained in:
parent
63a19d6786
commit
3735286f66
|
|
@ -0,0 +1,35 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 48381
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: bonus-auth
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: bonus_houqin_test
|
||||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: bonus@Admin123
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
||||
#加密组件
|
||||
jasypt:
|
||||
encryptor:
|
||||
password: Encrypt
|
||||
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
#!/bin/bash
|
||||
suffix="-bonus-jyy-canteen"
|
||||
jar_version="24.10.0-SNAPSHOT"
|
||||
|
||||
export deploy_path=/opt/webapps/bonus-jyy-canteen
|
||||
export app_workspace=/opt/builds/releases/Bonus-Cloud/${jar_version}
|
||||
#export biz_workspace=/opt/install/jenkins_home/workspace/Bonus-Cloud-JYY-CANTEEN
|
||||
|
||||
app_source_jars=(
|
||||
"bonus-auth-${jar_version}.jar"
|
||||
"bonus-gateway-${jar_version}.jar"
|
||||
"bonus-system-${jar_version}.jar"
|
||||
"bonus-job-${jar_version}.jar"
|
||||
"bonus-file-${jar_version}.jar"
|
||||
"bonus-visual-monitor-${jar_version}.jar"
|
||||
)
|
||||
|
||||
#for source_jar in "${app_source_jars[@]}"; do
|
||||
# cp -f ${app_workspace}/${source_jar} $deploy_path
|
||||
# echo "copied ${app_workspace}/${source_jar} to $deploy_path"
|
||||
#done
|
||||
for source_jar in "${app_source_jars[@]}"; do
|
||||
# 获取文件名(不带目录路径)
|
||||
filename=$(basename "$source_jar")
|
||||
echo "filename:$filename"
|
||||
# 获取文件名(不带扩展名)
|
||||
base_name="${filename%.jar}"
|
||||
echo "filename:$base_name"
|
||||
# 构造新的文件名
|
||||
new_filename="${base_name}${suffix}.jar"
|
||||
echo "filename:$new_filename"
|
||||
|
||||
cp -f ${app_workspace}/${source_jar} "$deploy_path/$new_filename"
|
||||
echo "copied ${app_workspace}/${source_jar} to '$deploy_path/$new_filename'"
|
||||
done
|
||||
|
||||
#cp -f ${biz_workspace}/"bonus-modules/bonus-jyy-canteen/target/bonus-smart-canteen-v3.jar" $deploy_path
|
||||
#echo "copied ${app_workspace}/${source_jar} to $deploy_path"
|
||||
|
||||
# Define an array of JAR files to run
|
||||
jars=("bonus-auth-${jar_version}-bonus-jyy-canteen.jar --spring.config.location=file:auth_bootstrap.yml"
|
||||
"bonus-gateway-${jar_version}-bonus-jyy-canteen.jar --spring.config.location=file:gateway_bootstrap.yml"
|
||||
"bonus-system-${jar_version}-bonus-jyy-canteen.jar --spring.config.location=file:system_bootstrap.yml"
|
||||
"bonus-job-${jar_version}-bonus-jyy-canteen.jar --spring.config.location=file:job_bootstrap.yml"
|
||||
"bonus-file-${jar_version}-bonus-jyy-canteen.jar --spring.config.location=file:file_bootstrap.yml"
|
||||
"bonus-visual-monitor-${jar_version}-bonus-jyy-canteen.jar --spring.config.location=file:visual_bootstrap.yml"
|
||||
"bonus-smart-canteen-v3.jar --spring.config.location=file:smart_canteen_bootstrap.yml")
|
||||
|
||||
# 遍历数组并检查每个JAR文件的进程
|
||||
for jar_with_args in "${jars[@]}"; do
|
||||
# 提取JAR文件名(不包括参数)
|
||||
jar=$(echo $jar_with_args | awk '{print $1}')
|
||||
|
||||
# 检查进程是否启动
|
||||
echo "原应用程序1 $jar "
|
||||
pids=$(pgrep -f $jar || true)
|
||||
echo "原应用程序2 $jar "
|
||||
if [ -n "$pids" ]; then
|
||||
echo "$jar is running with PID(s): $pids"
|
||||
# 杀死进程
|
||||
for pid in $pids; do
|
||||
kill -9 $pid
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Process $pid for $jar killed successfully"
|
||||
else
|
||||
echo "Failed to kill process $pid for $jar"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "$jar is not running"
|
||||
fi
|
||||
done
|
||||
|
||||
cd $deploy_path || { echo "Failed to change directory to $deploy_path"; exit 1; }
|
||||
# Iterate over the JAR files array
|
||||
for jar in "${jars[@]}"; do
|
||||
echo "Starting $jar"
|
||||
nohup /usr/local/jdk1.8.0/bin/java -jar $jar >/dev/null 2>&1 &
|
||||
done
|
||||
|
||||
echo "All JARs have been run successfully."
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 48383
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: bonus-file
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: bonus_houqin_test
|
||||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: bonus@Admin123
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 48380
|
||||
servlet:
|
||||
context-path: zhgd
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: bonus-gateway
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: bonus_houqin_test
|
||||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: bonus@Admin123
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
sentinel:
|
||||
# 取消控制台懒加载
|
||||
eager: true
|
||||
transport:
|
||||
# 控制台地址
|
||||
dashboard: 192.168.0.14:28858
|
||||
# nacos配置持久化
|
||||
datasource:
|
||||
ds1:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: bonus@Admin123
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
dataId: sentinel-bonus-gateway
|
||||
groupId: DEFAULT_GROUP
|
||||
data-type: json
|
||||
rule-type: gw-flow
|
||||
|
||||
|
||||
#系统 自动 加解密开关
|
||||
system:
|
||||
encryptEnabled: false
|
||||
decryptEnabled: true
|
||||
#加密组件
|
||||
jasypt:
|
||||
encryptor:
|
||||
password: Encrypt
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 58584
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: bonus-gen
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: bonus_houqin_test
|
||||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: bonus@Admin123
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 58585
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: bonus-job
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: bonus_houqin_test
|
||||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: bonus@Admin123
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
AUTH_RESOURCE_NAME=bonus-auth-24.10.0-SNAPSHOT-bonus-jyy-canteen.jar
|
||||
GATEWAY_RESOURCE_NAME=bonus-gateway-24.10.0-SNAPSHOT-bonus-jyy-canteen.jar
|
||||
SYS_RESOURCE_NAME=bonus-system-24.10.0-SNAPSHOT-bonus-jyy-canteen.jar
|
||||
JOB_RESOURCE_NAME=bonus-job-24.10.0-SNAPSHOT-bonus-jyy-canteen.jar
|
||||
FILE_RESOURCE_NAME=bonus-file-24.10.0-SNAPSHOT-bonus-jyy-canteen.jar
|
||||
MONITOR_RESOURCE_NAME=bonus-visual-monitor-24.10.0-SNAPSHOT-bonus-jyy-canteen.jar
|
||||
SMART_CANTEEN_RESOURCE_NAME=bonus-smart-canteen-v3.jar
|
||||
|
||||
|
||||
tpid=`ps -ef|grep $AUTH_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Stop Process...'
|
||||
kill -15 $tpid
|
||||
fi
|
||||
sleep 5
|
||||
tpid=`ps -ef|grep $AUTH_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Kill Process!'
|
||||
kill -9 $tpid
|
||||
else
|
||||
echo 'Stop Success!'
|
||||
fi
|
||||
|
||||
|
||||
tpid=`ps -ef|grep $GATEWAY_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Stop Process...'
|
||||
kill -15 $tpid
|
||||
fi
|
||||
sleep 5
|
||||
tpid=`ps -ef|grep $GATEWAY_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Kill Process!'
|
||||
kill -9 $tpid
|
||||
else
|
||||
echo 'Stop Success!'
|
||||
fi
|
||||
|
||||
|
||||
tpid=`ps -ef|grep $SYS_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Stop Process...'
|
||||
kill -15 $tpid
|
||||
fi
|
||||
sleep 5
|
||||
tpid=`ps -ef|grep $SYS_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Kill Process!'
|
||||
kill -9 $tpid
|
||||
else
|
||||
echo 'Stop Success!'
|
||||
fi
|
||||
|
||||
|
||||
tpid=`ps -ef|grep $JOB_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Stop Process...'
|
||||
kill -15 $tpid
|
||||
fi
|
||||
sleep 5
|
||||
tpid=`ps -ef|grep $JOB_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Kill Process!'
|
||||
kill -9 $tpid
|
||||
else
|
||||
echo 'Stop Success!'
|
||||
fi
|
||||
|
||||
|
||||
tpid=`ps -ef|grep $FILE_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Stop Process...'
|
||||
kill -15 $tpid
|
||||
fi
|
||||
sleep 5
|
||||
tpid=`ps -ef|grep $FILE_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Kill Process!'
|
||||
kill -9 $tpid
|
||||
else
|
||||
echo 'Stop Success!'
|
||||
fi
|
||||
|
||||
|
||||
tpid=`ps -ef|grep $MONITOR_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Stop Process...'
|
||||
kill -15 $tpid
|
||||
fi
|
||||
sleep 5
|
||||
tpid=`ps -ef|grep $MONITOR_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Kill Process!'
|
||||
kill -9 $tpid
|
||||
else
|
||||
echo 'Stop Success!'
|
||||
fi
|
||||
|
||||
|
||||
tpid=`ps -ef|grep $SMART_CANTEEN_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Stop Process...'
|
||||
kill -15 $tpid
|
||||
fi
|
||||
sleep 5
|
||||
tpid=`ps -ef|grep $SMART_CANTEEN_RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
|
||||
if [ ${tpid} ]; then
|
||||
echo 'Kill Process!'
|
||||
kill -9 $tpid
|
||||
else
|
||||
echo 'Stop Success!'
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
// 设置自定义JDK路径,因为每个项目可能需要不同版本的jdk
|
||||
JAVA_HOME = '/usr/lib/jvm/jdk1.8.0_381'
|
||||
JOBNAME="${JOB_NAME}"
|
||||
JENKINS_NODE_COOKIE = "dontKillMe"
|
||||
#SPRING_PROFILES_ACTIVE = "dev"
|
||||
}
|
||||
stages {
|
||||
stage('Check out') {
|
||||
steps {
|
||||
withCredentials([usernamePassword(credentialsId: 'f7070987-9b49-4ae1-af6d-53a3bf26799b', passwordVariable: 'Max@2023', usernameVariable: 'bonus')]) {
|
||||
checkout([
|
||||
$class: 'GitSCM',
|
||||
branches: [[name: '*/master']],
|
||||
doGenerateSubmoduleConfigurations: false,
|
||||
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: '']],
|
||||
submoduleCfg: [],
|
||||
userRemoteConfigs: [[url: 'http://192.168.0.244:3000/bonus/Bonus-Cloud-Smart-Canteen.git']]
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Move file') {
|
||||
steps {
|
||||
echo 'move file start!'
|
||||
sh 'chmod 777 ${WORKSPACE}/scripts/*'
|
||||
// 如果需要拷贝文件,打开并编写以下脚本
|
||||
// sh '${WORKSPACE}/scripts/moveFile.sh'
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
echo 'build start!'
|
||||
sh 'env JAVA_HOME=$JAVA_HOME /usr/local/src/apache-maven-3.9.4/bin/mvn clean package'
|
||||
}
|
||||
}
|
||||
stage('Sonar scan') {
|
||||
steps {
|
||||
script {
|
||||
echo 'sonar scan start!'
|
||||
def scannerHome = tool 'sonar-scanner'
|
||||
withSonarQubeEnv('sonarqube-server') {
|
||||
sh "/usr/local/sonar-scanner-5.0.1.3006-linux/bin/sonar-scanner " +
|
||||
"-Dsonar.projectKey=${JOB_NAME} " +
|
||||
"-Dsonar.projectName=${JOB_NAME} " +
|
||||
"-Dsonar.sourceEncoding=UTF-8 " +
|
||||
"-Dsonar.language=java " +
|
||||
"-Dsonar.projectVersion=1.0 " +
|
||||
"-Dsonar.sources=. " +
|
||||
"-Dsonar.java.source=1.8 " +
|
||||
"-Dsonar.java.target=1.8 " +
|
||||
"-Dsonar.scm.disabled=true " +
|
||||
"-Dsonar.exclusions=test/**,node_modules/**,static/**,**/*.js,**/*.html,**/*.css,**/*.jar " +
|
||||
"-Dsonar.java.binaries=**/target/classes"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
echo 'deploy start!'
|
||||
sh '''BUILD_ID=DONTKILLME sh ${WORKSPACE}/scripts/deploy.sh'''
|
||||
}
|
||||
}
|
||||
stage('Dingding') {
|
||||
steps {
|
||||
echo 'Dingding start!'
|
||||
script {
|
||||
def webhookUrl = 'https://oapi.dingtalk.com/robot/send?access_token=eae0af98514a0db9a9a0d5cd8e337d13e7c16cd81d4a90b503e465a573020add' //替换为你自己的钉钉机器人Webhook地址
|
||||
def message = "${JOB_NAME} TEST已完成: ${env.BUILD_URL} \n 到Sonarqube查看问题:http://192.168.0.244:9000/dashboard?id=${JOB_NAME} \n 查看新包: http://192.168.0.244/${JOB_NAME}/${BUILD_NUMBER} "
|
||||
echo "${message}"
|
||||
sh "curl -H 'Content-Type: application/json' -d '{\"msgtype\": \"text\", \"text\": {\"content\": \"${message}\"}, \"at\": {\"atMobiles\": [\"张三,李四\"], \"isAtAll\": true}}' ${webhookUrl}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 58589
|
||||
# Spring
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
# 文件最大
|
||||
max-file-size: 20MB
|
||||
# 设置总上传数据总大小
|
||||
max-request-size: 20MB
|
||||
application:
|
||||
# 应用名称
|
||||
name: bonus-shared-station
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: bonus_houqin_test
|
||||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: bonus@Admin123
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 48388
|
||||
# Spring
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
# 文件最大
|
||||
max-file-size: 20MB
|
||||
# 设置总上传数据总大小
|
||||
max-request-size: 20MB
|
||||
application:
|
||||
# 应用名称
|
||||
name: bonus-smart-canteen
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: bonus_houqin_test
|
||||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: bonus@Admin123
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
P_ID=$(pgrep -f BonusSmartCanteenApplication)
|
||||
if [ -z "$P_ID" ]; then
|
||||
echo "BonusSmartCanteenApplication is not running"
|
||||
else
|
||||
kill -9 "$P_ID"
|
||||
fi
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 48382
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: bonus-system
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: bonus_houqin_test
|
||||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: bonus@Admin123
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
system:
|
||||
supports:
|
||||
phoneLogin: true
|
||||
emailLogin: true
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 58586
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: bonus-monitor
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: bonus_houqin_test
|
||||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: bonus@Admin123
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.0.244:8848
|
||||
namespace: jyy_canteen
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
Loading…
Reference in New Issue