Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-health-science
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐俊
yn-health-science
Commits
08b09131
Commit
08b09131
authored
Dec 12, 2024
by
lijing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加配置分离
parent
b7add199
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
158 additions
and
125 deletions
+158
-125
autodeploy.sh
autodeploy.sh
+47
-0
pom.xml
pom.xml
+23
-1
application-local.yml
science-admin/src/main/resources/application-local.yml
+28
-0
application-prod.yml
science-admin/src/main/resources/application-prod.yml
+28
-0
application-test.yml
science-admin/src/main/resources/application-test.yml
+30
-0
application.yml
science-admin/src/main/resources/application.yml
+1
-123
logback-spring.xml
science-admin/src/main/resources/logback-spring.xml
+1
-1
No files found.
autodeploy.sh
0 → 100644
View file @
08b09131
#!/bin/bash
#引入环境变量
export
YBS_SCIENCE_HOME
=
/home/data/jar
#运行目录
rundir
=
""
case
$1
in
ybs-science
)
rundir
=
science
;;
*
)
echo
"输入参数
$1
有误,请重试!!"
exit
;;
esac
#当前运行jar包绝对路径
runPath
=
$YBS_SCIENCE_HOME
/
$rundir
/run
#移动
sudo mv
~/
$1
.jar
$YBS_SCIENCE_HOME
/
$rundir
/pub/
#备份
bakJarName
=
`
date
+%Y%m%d%H:%M:%S
`
sudo mkdir
$YBS_SCIENCE_HOME
/
$rundir
/bak/
$bakJarName
sudo mv
$runPath
/
*
$YBS_SCIENCE_HOME
/
$rundir
/bak/
$bakJarName
/
#放包
sudo mv
$YBS_SCIENCE_HOME
/
$rundir
/pub/
*
$runPath
/
runjar
=
`
ls
$runPath
`
if
[[
-z
$runjar
]]
;
then
echo
"找不到"
$1
"的jar包,请检查jar是否存在. shell脚本退出"
exit
fi
#得到服务pid
server
=
`
sudo
ps
-ef
|
grep
java |
grep
$1
|grep
nohup
|
grep
-v
grep
|
awk
'{print $2}'
`
if
[[
$server
-gt
0
]]
;
then
echo
"运行服务列表中存在"
$1
"服务,正在关停..."
sudo
ps
-ef
|
grep
java |
grep
$1
|grep
-v
grep
|
awk
'{print $2}'
|xargs
sudo kill
-9
sleep
3
echo
"关停成功"
fi
cd
$runPath
sudo nohup
java
-jar
$runjar
>
/dev/null 2>&1 &
sleep
3s
echo
"启动成功,请查看控制台日志确认"
\ No newline at end of file
pom.xml
View file @
08b09131
...
...
@@ -134,7 +134,29 @@
</dependency>
</dependencies>
<profiles>
<profile>
<id>
local
</id>
<properties>
<profileActive>
local
</profileActive>
</properties>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
</profile>
<profile>
<id>
test
</id>
<properties>
<profileActive>
test
</profileActive>
</properties>
</profile>
<profile>
<id>
prod
</id>
<properties>
<profileActive>
prod
</profileActive>
</properties>
</profile>
</profiles>
<repositories>
<repository>
<id>
central
</id>
...
...
science-admin/src/main/resources/application-local.yml
0 → 100644
View file @
08b09131
#贵州省卫生健康科研项目管理系统(本地环境)
spring
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://ybs01beta.mysql.rds.aliyuncs.com/yn_srp_system?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai
username
:
yn_kysb
password
:
'
&Zk4obO7v@'
redis
:
# 超时时间
timeout
:
10000ms
# 服务器地址
host
:
192.168.1.95
# 服务器端口
port
:
6379
# 数据库
database
:
4
# 密码
password
:
Ynbys2@)@)
lettuce
:
pool
:
# 最大连接数(默认8)
max-active
:
1024
# 最大连接阻塞等待时间,默认-1
max-wait
:
10000ms
# 最大空闲连接
max-idle
:
200
# 最小空闲连接
min-idle
:
2
science-admin/src/main/resources/application-prod.yml
0 → 100644
View file @
08b09131
#贵州省卫生健康科研项目管理系统(本地环境)
spring
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://ybs01beta.mysql.rds.aliyuncs.com/yn_srp_system?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai
username
:
yn_kysb
password
:
'
&Zk4obO7v@'
redis
:
# 超时时间
timeout
:
10000ms
# 服务器地址
host
:
192.168.1.95
# 服务器端口
port
:
6379
# 数据库
database
:
4
# 密码
password
:
Ynbys2@)@)
lettuce
:
pool
:
# 最大连接数(默认8)
max-active
:
1024
# 最大连接阻塞等待时间,默认-1
max-wait
:
10000ms
# 最大空闲连接
max-idle
:
200
# 最小空闲连接
min-idle
:
2
science-admin/src/main/resources/application-test.yml
0 → 100644
View file @
08b09131
#内蒙卫生健康科研项目管理系统(测试环境)
spring
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://ybs01beta.mysql.rds.aliyuncs.com/yn_srp_system?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai
username
:
yn_kysb
password
:
'
&Zk4obO7v@'
redis
:
# 超时时间
timeout
:
10000ms
# 服务器地址
host
:
192.168.1.23
# 服务器端口
port
:
6379
# 数据库
database
:
4
# 密码
password
:
123456
lettuce
:
pool
:
# 最大连接数(默认8)
max-active
:
1024
# 最大连接阻塞等待时间,默认-1
max-wait
:
10000ms
# 最大空闲连接
max-idle
:
200
# 最小空闲连接
min-idle
:
5
science-admin/src/main/resources/application.yml
View file @
08b09131
...
...
@@ -8,8 +8,7 @@ spring:
application
:
name
:
science-admin
profiles
:
# active: '@profiles.active@'
active
:
'
local'
active
:
@
profileActive@
http
:
encoding
:
force
:
true
...
...
@@ -62,130 +61,9 @@ swagger:
basePackage
:
com.yiboshi.science.rest.v1
globalHeader
:
true
---
#贵州省卫生健康科研项目管理系统(本地环境)
spring
:
profiles
:
local
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://ybs01beta.mysql.rds.aliyuncs.com/yn_srp_system?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai
username
:
yn_kysb
password
:
'
&Zk4obO7v@'
redis
:
# 超时时间
timeout
:
10000ms
# 服务器地址
host
:
192.168.1.95
# 服务器端口
port
:
6379
# 数据库
database
:
4
# 密码
password
:
Ynbys2@)@)
lettuce
:
pool
:
# 最大连接数(默认8)
max-active
:
1024
# 最大连接阻塞等待时间,默认-1
max-wait
:
10000ms
# 最大空闲连接
max-idle
:
200
# 最小空闲连接
min-idle
:
2
---
#内蒙卫生健康科研项目管理系统(测试环境)
spring
:
profiles
:
test
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://ybs01beta.mysql.rds.aliyuncs.com/yn_srp_system?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai
username
:
yn_kysb
password
:
'
&Zk4obO7v@'
redis
:
# 超时时间
timeout
:
10000ms
# 服务器地址
host
:
192.168.1.23
# 服务器端口
port
:
6379
# 数据库
database
:
4
# 密码
password
:
123456
lettuce
:
pool
:
# 最大连接数(默认8)
max-active
:
1024
# 最大连接阻塞等待时间,默认-1
max-wait
:
10000ms
# 最大空闲连接
max-idle
:
200
# 最小空闲连接
min-idle
:
5
---
#贵州省卫生健康科研项目管理系统(开发环境)
spring
:
profiles
:
dev
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://ybs01beta.mysql.rds.aliyuncs.com/yn_srp_system?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai
username
:
yn_kysb
password
:
'
&Zk4obO7v@'
redis
:
# 超时时间
timeout
:
10000ms
# 服务器地址
host
:
beta-reids-pub.redis.rds.aliyuncs.com
# 服务器端口
port
:
6379
# 数据库
database
:
4
# 密码
password
:
yn_kysb:&Zk4obO7v@
lettuce
:
pool
:
# 最大连接数(默认8)
max-active
:
1024
# 最大连接阻塞等待时间,默认-1
max-wait
:
10000ms
# 最大空闲连接
max-idle
:
200
# 最小空闲连接
min-idle
:
5
---
#贵州省卫生健康科研项目管理系统(生成环境)
spring
:
profiles
:
prod
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://nmg-kysb.mysql.rds.aliyuncs.com/yn_srp_system?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai
username
:
yhbj_yn
password
:
'
WpKJS2ZEx&35DrU'
redis
:
# 超时时间
timeout
:
10000ms
# 服务器地址
host
:
nmg-kysb.redis.rds.aliyuncs.com
# 服务器端口
port
:
6379
# 数据库
database
:
7
# 密码
password
:
yhbj_yn:WpKJS2ZEx&35DrU
lettuce
:
pool
:
# 最大连接数(默认8)
max-active
:
1024
# 最大连接阻塞等待时间,默认-1
max-wait
:
10000ms
# 最大空闲连接
max-idle
:
200
# 最小空闲连接
min-idle
:
5
---
# 登录相关配置
verification
:
# 验证码
...
...
science-admin/src/main/resources/logback-spring.xml
View file @
08b09131
...
...
@@ -37,7 +37,7 @@
</logger>
</springProfile>
<springProfile
name=
"
dev,
test"
>
<springProfile
name=
"test"
>
<logger
name=
"com.yiboshi"
level=
"debug"
additivity=
"false"
>
<appender-ref
ref=
"CONSOLE"
/>
<appender-ref
ref=
"FILE"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment