Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-microservice-exam
Project
Overview
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
汪想
spring-microservice-exam
Commits
f0c822a6
Commit
f0c822a6
authored
Dec 19, 2019
by
tangyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug、调整GC参数
parent
32f5194f
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
106 additions
and
72 deletions
+106
-72
README.md
README.md
+11
-14
Dockerfile
config-service/Dockerfile
+2
-2
gateway-service.yml
config-service/src/main/resources/config/gateway-service.yml
+1
-1
list.vue
...spring-microservice-exam-ui/src/views/attachment/list.vue
+10
-12
PanelGroup.vue
...am-ui/src/views/dashboard/admin/components/PanelGroup.vue
+17
-13
course.vue
...end/spring-microservice-exam-ui/src/views/exam/course.vue
+4
-4
exam.vue
frontend/spring-microservice-exam-ui/src/views/exam/exam.vue
+1
-1
knowledge.vue
.../spring-microservice-exam-ui/src/views/exam/knowledge.vue
+4
-3
client.vue
...tend/spring-microservice-exam-ui/src/views/sys/client.vue
+2
-2
dept.vue
frontend/spring-microservice-exam-ui/src/views/sys/dept.vue
+0
-1
footer.vue
.../spring-microservice-exam-web/src/views/common/footer.vue
+1
-1
header.vue
.../spring-microservice-exam-web/src/views/common/header.vue
+1
-1
account.vue
...ring-microservice-exam-web/src/views/personal/account.vue
+2
-3
Dockerfile
gateway-service/Dockerfile
+2
-2
Dockerfile
modules/auth-service-parent/auth-service/Dockerfile
+2
-2
Dockerfile
modules/exam-service-parent/exam-service/Dockerfile
+2
-2
Dockerfile
modules/msc-service-parent/msc-service/Dockerfile
+2
-2
DashboardDto.java
...ain/java/com/github/tangyi/user/api/dto/DashboardDto.java
+10
-0
Dockerfile
modules/user-service-parent/user-service/Dockerfile
+2
-2
DashboardController.java
...om/github/tangyi/user/controller/DashboardController.java
+5
-0
TenantMapper.java
...main/java/com/github/tangyi/user/mapper/TenantMapper.java
+7
-0
AttachmentService.java
...ava/com/github/tangyi/user/service/AttachmentService.java
+0
-1
TenantService.java
...in/java/com/github/tangyi/user/service/TenantService.java
+10
-0
TenantMapper.xml
...t/user-service/src/main/resources/mapper/TenantMapper.xml
+5
-0
Dockerfile
monitor-service/Dockerfile
+2
-2
sonar-project.properties
sonar-project.properties
+1
-1
No files found.
README.md
View file @
f0c822a6
# 1 简介
-
重写
[
spring-cloud-online-exam
](
https://gitee.com/wells2333/spring-cloud-online-exam
)
-
采用前后端分离技术
-
前端采用
`vue2.0`
,通过
`jwt`
和后端交互
-
后端基于
`spring boot`
、
`spring cloud`
、
`MySQL`
等技术实现权限管理、考试管理等功能。
硕果云,基于Spring Cloud搭建的新一代微服务教学管理平台,提供多租户、权限管理、考试、练习等功能。
# 2 在线体验
...
...
@@ -14,13 +8,13 @@
-
后台:
[
http://118.25.138.130:81
](
http://118.25.138.130:81
)
默认
账号:
账号:
单位ID:gitee
1.
管理员:admin/123456
2.
学生:student/123456
3.
教师:teacher/123456
| 单位ID | 账号 | 密码 | 角色 |
| --------- | -------- | -------- | -------- |
| gitee | admin | 123456 | 管理员 |
| gitee | student | 123456 | 学生 |
| gitee | teacher | 123456 | 老师 |
# 3 技术选型
...
...
@@ -141,6 +135,8 @@
交流QQ群:
<a
target=
"_blank"
href=
"https://jq.qq.com/?_wv=1027&k=5RKZNF2"
><img
border=
"0"
src=
"http://pub.idqqimg.com/wpa/images/group.png"
alt=
"Spring Cloud考试系统学习"
title=
"Spring Cloud考试系统学习"
></a>
QQ群号:996208878
QQ群号:996208878,二维码:
<img
src=
"http://118.25.138.130/static/img/WechatIMG4.c775d3e.png"
alt=
"Spring Cloud考试系统学习"
title=
"Spring Cloud考试系统学习"
>
如果您觉得有帮助,请点右上角 "Star" 或者项目底部的“捐助”支持一下,谢谢!
\ No newline at end of file
config-service/Dockerfile
View file @
f0c822a6
...
...
@@ -5,4 +5,4 @@ ADD target/${JAR_FILE} /opt/app.jar
EXPOSE
9181
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
# 演示环境GC参数:JAVA_OPS='-Xmx512m -Xms256m -XX:+UnlockDiagnosticVMOptions -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:AutoBoxCacheMax=20000 -XX:-UseBiasedLocking -XX:-UseCounterDecay -XX:-OmitStackTraceInFastThrow -Djava.security.egd=file:/dev/urandom -XX:+CMSParallelInitialMarkEnabled -XX:+ParallelRefProcEnabled -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+HeapDumpOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintCompressedOopsMode -XX:-PrintGCApplicationStoppedTime'
\ No newline at end of file
config-service/src/main/resources/config/gateway-service.yml
View file @
f0c822a6
...
...
@@ -108,13 +108,13 @@ swagger:
# 演示环境
preview
:
enabled
:
${PREVIEW_ENABLED:
false
}
ignores
:
-
api/auth
# 授权服务
-
resetPassword
# 重置密码
-
register
-
checkExist
-
updateInfo
-
updateAvatar
-
attachment
-
api/exam
# 考试服务
-
api/msc
...
...
frontend/spring-microservice-exam-ui/src/views/attachment/list.vue
View file @
f0c822a6
...
...
@@ -10,7 +10,7 @@
:show-file-list=
"showFileList"
:on-success=
"handleUploadSuccess"
:on-progress=
"handleUploadProgress"
:action=
"sysConfig.uploadUrl
"
action=
"api/user/v1/attachment/upload
"
:headers=
"headers"
:data=
"params"
class=
"upload-demo"
...
...
@@ -28,17 +28,17 @@
style=
"width: 100%;"
@
sort-change=
"sortChange"
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
sortable
prop=
"id"
label=
"流水号"
min-width=
"100"
>
<el-table-column
prop=
"id"
label=
"流水号"
min-width=
"100"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
id
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('table.attachName')"
sortable
prop=
"attach_name"
min-width=
"9
0"
>
<el-table-column
:label=
"$t('table.attachName')"
prop=
"attach_name"
min-width=
"12
0"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
attachName
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('table.uploader')"
min-width=
"
9
0"
>
<el-table-column
:label=
"$t('table.uploader')"
min-width=
"
5
0"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
creator
}}
</span>
</
template
>
...
...
@@ -48,9 +48,9 @@
<span>
{{
scope
.
row
.
busiType
|
attachmentTypeFilter
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('table.uploadDate')"
min-width=
"
9
0"
>
<el-table-column
:label=
"$t('table.uploadDate')"
min-width=
"
7
0"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
createDate
}}
</span>
<span>
{{
scope
.
row
.
createDate
|
timeFilter
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('table.actions')"
class-name=
"status-col"
width=
"300px"
>
...
...
@@ -72,7 +72,7 @@
import
{
fetchList
,
addObj
,
putObj
,
delAttachment
,
getDownloadUrl
}
from
'@/api/admin/attachment'
import
waves
from
'@/directive/waves'
import
{
getToken
}
from
'@/utils/auth'
// getToken from cookie
import
{
notifySuccess
,
messageSuccess
,
isNotEmpty
}
from
'@/utils/util'
import
{
notifySuccess
,
messageSuccess
,
isNotEmpty
,
formatDate
}
from
'@/utils/util'
import
{
mapState
}
from
'vuex'
import
SpinnerLoading
from
'@/components/SpinnerLoading'
...
...
@@ -105,6 +105,9 @@ export default {
attachType
=
'普通附件'
}
return
attachType
},
timeFilter
(
time
)
{
return
formatDate
(
new
Date
(
time
),
'yyyy-MM-dd hh:mm'
)
}
},
data
()
{
...
...
@@ -155,11 +158,6 @@ export default {
created
()
{
this
.
getList
()
},
computed
:
{
...
mapState
({
sysConfig
:
state
=>
state
.
sysConfig
.
sysConfig
})
},
methods
:
{
getList
()
{
this
.
listLoading
=
true
...
...
frontend/spring-microservice-exam-ui/src/views/dashboard/admin/components/PanelGroup.vue
View file @
f0c822a6
<
template
>
<el-row
:gutter=
"40"
class=
"panel-group"
>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('purchases')"
>
<div
class=
"card-panel-icon-wrapper icon-tab"
>
<svg-icon
icon-class=
"tab"
class-name=
"card-panel-icon"
/>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
单位数
</div>
<count-to
:start-val=
"0"
:end-val=
"tenantNumber"
:duration=
"2400"
class=
"card-panel-num"
/>
</div>
</div>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('newVisitis')"
>
<div
class=
"card-panel-icon-wrapper icon-people"
>
<svg-icon
icon-class=
"peoples"
class-name=
"card-panel-icon"
/>
...
...
@@ -23,22 +34,11 @@
</div>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('
purchase
s')"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('
shopping
s')"
>
<div
class=
"card-panel-icon-wrapper icon-chart"
>
<svg-icon
icon-class=
"chart"
class-name=
"card-panel-icon"
/>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
参加人数
</div>
<count-to
:start-val=
"0"
:end-val=
"examUserNumber"
:duration=
"2400"
class=
"card-panel-num"
/>
</div>
</div>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('shoppings')"
>
<div
class=
"card-panel-icon-wrapper icon-tab"
>
<svg-icon
icon-class=
"tab"
class-name=
"card-panel-icon"
/>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
课程数
</div>
<count-to
:start-val=
"0"
:end-val=
"13600"
:duration=
"2600"
class=
"card-panel-num"
/>
</div>
...
...
@@ -60,7 +60,8 @@ export default {
return
{
onlineUserNumber
:
0
,
examinationNumber
:
0
,
examUserNumber
:
0
examUserNumber
:
0
,
tenantNumber
:
0
}
},
created
()
{
...
...
@@ -84,6 +85,9 @@ export default {
if
(
isNotEmpty
(
data
.
examUserNumber
))
{
this
.
examUserNumber
=
parseInt
(
data
.
examUserNumber
)
}
if
(
isNotEmpty
(
data
.
tenantCount
))
{
this
.
tenantNumber
=
parseInt
(
data
.
tenantCount
)
}
}
}).
catch
(
error
=>
{
console
.
error
(
error
)
...
...
frontend/spring-microservice-exam-ui/src/views/exam/course.vue
View file @
f0c822a6
...
...
@@ -18,22 +18,22 @@
@selection-change="handleSelectionChange"
@sort-change="sortChange">
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
:label=
"$t('table.courseName')"
sortable
prop=
"course_name"
>
<el-table-column
:label=
"$t('table.courseName')"
prop=
"course_name"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
courseName
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('table.college')"
sortable
prop=
"college"
>
<el-table-column
:label=
"$t('table.college')"
prop=
"college"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
college
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('table.major')"
sortable
prop=
"major"
>
<el-table-column
:label=
"$t('table.major')"
prop=
"major"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
major
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('table.teacher')"
sortable
prop=
"teacher"
>
<el-table-column
:label=
"$t('table.teacher')"
prop=
"teacher"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
teacher
}}
</span>
</
template
>
...
...
frontend/spring-microservice-exam-ui/src/views/exam/exam.vue
View file @
f0c822a6
...
...
@@ -144,7 +144,7 @@
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
:action=
"sysConfig.uploadUrl
"
action=
"api/user/v1/attachment/upload
"
:headers=
"headers"
:data=
"params"
class=
"avatar-uploader"
>
...
...
frontend/spring-microservice-exam-ui/src/views/exam/knowledge.vue
View file @
f0c822a6
...
...
@@ -70,7 +70,7 @@
:on-success=
"handleUploadSuccess"
:on-exceed=
"handleExceed"
:on-remove=
"handleRemove"
:action=
"sysConfig.uploadUrl
"
action=
"api/user/v1/attachment/upload
"
:headers=
"headers"
:data=
"params"
:limit=
"1"
...
...
@@ -95,7 +95,7 @@
import
{
fetchKnowledgeList
,
addObj
,
putObj
,
delObj
,
delAllObj
}
from
'@/api/exam/knowledge'
import
waves
from
'@/directive/waves'
import
{
mapGetters
,
mapState
}
from
'vuex'
import
{
checkMultipleSelect
,
notifySuccess
,
notifyFail
,
messageSuccess
}
from
'@/utils/util'
import
{
isNotEmpty
,
checkMultipleSelect
,
notifySuccess
,
notifyFail
,
messageSuccess
}
from
'@/utils/util'
import
{
getToken
}
from
'@/utils/auth'
// getToken from cookie
import
{
getObj
,
delAttachment
}
from
'@/api/admin/attachment'
import
SpinnerLoading
from
'@/components/SpinnerLoading'
...
...
@@ -317,7 +317,8 @@ export default {
},
// 查询附件列表
getFileList
(
attachmentId
)
{
if
(
attachmentId
!==
''
)
{
this
.
fileList
=
[]
if
(
isNotEmpty
(
attachmentId
))
{
getObj
(
attachmentId
).
then
(
response
=>
{
const
data
=
response
.
data
.
data
const
attachment
=
{
...
...
frontend/spring-microservice-exam-ui/src/views/sys/client.vue
View file @
f0c822a6
...
...
@@ -17,12 +17,12 @@
@selection-change="handleSelectionChange"
@sort-change="sortChange">
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
:label=
"$t('table.client.clientId')"
sortable
prop=
"client_id"
>
<el-table-column
:label=
"$t('table.client.clientId')"
prop=
"client_id"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
clientId
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('table.client.clientSecretPlainText')"
>
<el-table-column
:label=
"$t('table.client.clientSecretPlainText')"
min-width=
"100"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
clientSecretPlainText
}}
</span>
</
template
>
...
...
frontend/spring-microservice-exam-ui/src/views/sys/dept.vue
View file @
f0c822a6
...
...
@@ -13,7 +13,6 @@
:props=
"defaultProps"
class=
"filter-tree"
node-key=
"id"
default-expand-all
highlight-current
@
node-click=
"getNodeData"
@
node-expand=
"nodeExpand"
...
...
frontend/spring-microservice-exam-web/src/views/common/footer.vue
View file @
f0c822a6
...
...
@@ -7,7 +7,7 @@
<h4>
链接
</h4>
<a
target=
"_blank"
href=
"https://gitee.com/wells2333/spring-microservice-exam"
>
码云
</a>
<a
target=
"_blank"
href=
"https://github.com/"
>
GITHUB
</a>
<a
target=
"_blank"
href=
"http://
it99.club
:81"
>
管理后台
</a>
<a
target=
"_blank"
href=
"http://
118.25.138.130
:81"
>
管理后台
</a>
<a
target=
"_blank"
href=
"https://gitee.com/wells2333/spring-microservice-exam/blob/master/CHANGELOG.md"
>
更新日志
</a>
</el-col>
<el-col
:span=
"4"
class=
"footer-col"
>
...
...
frontend/spring-microservice-exam-web/src/views/common/header.vue
View file @
f0c822a6
...
...
@@ -39,7 +39,7 @@
<a
href=
"https://www.kancloud.cn/tangyi/spring-microservice-exam/1322870"
target=
"_blank"
>
部署文档
</a>
</el-menu-item>
<el-menu-item
index=
"u-admin"
>
<a
href=
"http://
it99.club
:81"
target=
"_blank"
>
管理后台
</a>
<a
href=
"http://
118.25.138.130
:81"
target=
"_blank"
>
管理后台
</a>
</el-menu-item>
</el-submenu>
<el-submenu
index=
"/c"
>
...
...
frontend/spring-microservice-exam-web/src/views/personal/account.vue
View file @
f0c822a6
...
...
@@ -64,7 +64,7 @@
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
:action=
"sysConfig.uploadUrl
"
action=
"api/user/v1/attachment/upload
"
:headers=
"headers"
:data=
"params"
class=
"avatar-uploader"
>
...
...
@@ -127,8 +127,7 @@ export default {
},
computed
:
{
...
mapState
({
userInfo
:
state
=>
state
.
user
.
userInfo
,
sysConfig
:
state
=>
state
.
sysConfig
.
sysConfig
userInfo
:
state
=>
state
.
user
.
userInfo
})
},
methods
:
{
...
...
gateway-service/Dockerfile
View file @
f0c822a6
...
...
@@ -5,4 +5,4 @@ ADD target/${JAR_FILE} /opt/app.jar
EXPOSE
9180
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
# 演示环境GC参数:JAVA_OPS='-Xmx512m -Xms256m -XX:+UnlockDiagnosticVMOptions -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:AutoBoxCacheMax=20000 -XX:-UseBiasedLocking -XX:-UseCounterDecay -XX:-OmitStackTraceInFastThrow -Djava.security.egd=file:/dev/urandom -XX:+CMSParallelInitialMarkEnabled -XX:+ParallelRefProcEnabled -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+HeapDumpOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintCompressedOopsMode -XX:-PrintGCApplicationStoppedTime'
\ No newline at end of file
modules/auth-service-parent/auth-service/Dockerfile
View file @
f0c822a6
...
...
@@ -5,4 +5,4 @@ ADD target/${JAR_FILE} /opt/app.jar
EXPOSE
9182
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
# 演示环境GC参数:JAVA_OPS='-Xmx512m -Xms256m -XX:+UnlockDiagnosticVMOptions -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:AutoBoxCacheMax=20000 -XX:-UseBiasedLocking -XX:-UseCounterDecay -XX:-OmitStackTraceInFastThrow -Djava.security.egd=file:/dev/urandom -XX:+CMSParallelInitialMarkEnabled -XX:+ParallelRefProcEnabled -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+HeapDumpOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintCompressedOopsMode -XX:-PrintGCApplicationStoppedTime'
\ No newline at end of file
modules/exam-service-parent/exam-service/Dockerfile
View file @
f0c822a6
...
...
@@ -5,4 +5,4 @@ ADD target/${JAR_FILE} /opt/app.jar
EXPOSE
9184
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
# 演示环境GC参数:JAVA_OPS='-Xmx512m -Xms256m -XX:+UnlockDiagnosticVMOptions -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:AutoBoxCacheMax=20000 -XX:-UseBiasedLocking -XX:-UseCounterDecay -XX:-OmitStackTraceInFastThrow -Djava.security.egd=file:/dev/urandom -XX:+CMSParallelInitialMarkEnabled -XX:+ParallelRefProcEnabled -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+HeapDumpOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintCompressedOopsMode -XX:-PrintGCApplicationStoppedTime'
\ No newline at end of file
modules/msc-service-parent/msc-service/Dockerfile
View file @
f0c822a6
...
...
@@ -5,4 +5,4 @@ ADD target/${JAR_FILE} /opt/app.jar
EXPOSE
9185
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
# 演示环境GC参数:JAVA_OPS='-Xmx512m -Xms256m -XX:+UnlockDiagnosticVMOptions -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:AutoBoxCacheMax=20000 -XX:-UseBiasedLocking -XX:-UseCounterDecay -XX:-OmitStackTraceInFastThrow -Djava.security.egd=file:/dev/urandom -XX:+CMSParallelInitialMarkEnabled -XX:+ParallelRefProcEnabled -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+HeapDumpOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintCompressedOopsMode -XX:-PrintGCApplicationStoppedTime'
\ No newline at end of file
modules/user-service-parent/user-service-api/src/main/java/com/github/tangyi/user/api/dto/DashboardDto.java
View file @
f0c822a6
...
...
@@ -29,4 +29,14 @@ public class DashboardDto implements Serializable {
* 参与人数
*/
private
String
examUserNumber
;
/**
* 单位数量
*/
private
String
tenantCount
;
/**
* 课程数
*/
private
String
courseCount
;
}
modules/user-service-parent/user-service/Dockerfile
View file @
f0c822a6
...
...
@@ -5,4 +5,4 @@ ADD target/${JAR_FILE} /opt/app.jar
EXPOSE
9185
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
# 演示环境GC参数:JAVA_OPS='-Xmx512m -Xms256m -XX:+UnlockDiagnosticVMOptions -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:AutoBoxCacheMax=20000 -XX:-UseBiasedLocking -XX:-UseCounterDecay -XX:-OmitStackTraceInFastThrow -Djava.security.egd=file:/dev/urandom -XX:+CMSParallelInitialMarkEnabled -XX:+ParallelRefProcEnabled -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+HeapDumpOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintCompressedOopsMode -XX:-PrintGCApplicationStoppedTime'
\ No newline at end of file
modules/user-service-parent/user-service/src/main/java/com/github/tangyi/user/controller/DashboardController.java
View file @
f0c822a6
...
...
@@ -8,6 +8,7 @@ import com.github.tangyi.common.core.vo.UserVo;
import
com.github.tangyi.common.core.web.BaseController
;
import
com.github.tangyi.exam.api.feign.ExaminationServiceClient
;
import
com.github.tangyi.user.api.dto.DashboardDto
;
import
com.github.tangyi.user.service.TenantService
;
import
com.github.tangyi.user.service.UserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -32,6 +33,8 @@ public class DashboardController extends BaseController {
private
final
UserService
userService
;
private
final
TenantService
tenantService
;
/**
* 获取管控台首页数据
*
...
...
@@ -48,6 +51,8 @@ public class DashboardController extends BaseController {
UserVo
userVo
=
new
UserVo
();
userVo
.
setTenantCode
(
tenantCode
);
dashboardDto
.
setOnlineUserNumber
(
userService
.
userCount
(
userVo
).
toString
());
// 租户数量
dashboardDto
.
setTenantCount
(
tenantService
.
tenantCount
().
toString
());
// 查询考试数量
ResponseBean
<
Integer
>
examinationCountResponseBean
=
examinationService
.
findExaminationCount
(
tenantCode
);
if
(!
ResponseUtil
.
isSuccess
(
examinationCountResponseBean
))
...
...
modules/user-service-parent/user-service/src/main/java/com/github/tangyi/user/mapper/TenantMapper.java
View file @
f0c822a6
...
...
@@ -22,4 +22,11 @@ public interface TenantMapper extends CrudMapper<Tenant> {
* @date 2019/05/26 10:29
*/
Tenant
getByTenantCode
(
String
tenantCode
);
/**
* 查询租户数量
*
* @return Integer
*/
Integer
tenantCount
();
}
modules/user-service-parent/user-service/src/main/java/com/github/tangyi/user/service/AttachmentService.java
View file @
f0c822a6
...
...
@@ -111,7 +111,6 @@ public class AttachmentService extends CrudService<AttachmentMapper, Attachment>
@Transactional
@CacheEvict
(
value
=
{
"attachment"
,
"attachment_preview"
},
key
=
"#attachment.id"
)
public
int
delete
(
Attachment
attachment
)
{
qiNiuService
.
delete
(
attachment
.
getAttachName
());
return
super
.
delete
(
attachment
);
}
...
...
modules/user-service-parent/user-service/src/main/java/com/github/tangyi/user/service/TenantService.java
View file @
f0c822a6
...
...
@@ -143,4 +143,14 @@ public class TenantService extends CrudService<TenantMapper, Tenant> {
public
int
deleteAll
(
Long
[]
ids
)
{
return
super
.
deleteAll
(
ids
);
}
/**
* 查询单位数量
* @return Integer
* @author tangyi
* @date 2019/12/18 5:09 下午
*/
public
Integer
tenantCount
()
{
return
this
.
dao
.
tenantCount
();
}
}
modules/user-service-parent/user-service/src/main/resources/mapper/TenantMapper.xml
View file @
f0c822a6
...
...
@@ -65,6 +65,11 @@
</foreach>
</select>
<select
id=
"tenantCount"
resultType=
"Integer"
>
SELECT COUNT(1) FROM sys_tenant a
WHERE a.del_flag = 0
</select>
<insert
id=
"insert"
>
INSERT INTO sys_tenant (
id,
...
...
monitor-service/Dockerfile
View file @
f0c822a6
...
...
@@ -5,4 +5,4 @@ ADD target/${JAR_FILE} /opt/app.jar
EXPOSE
9186
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
# 演示环境GC参数:JAVA_OPS='-Xmx512m -Xms256m -XX:+UnlockDiagnosticVMOptions -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:AutoBoxCacheMax=20000 -XX:-UseBiasedLocking -XX:-UseCounterDecay -XX:-OmitStackTraceInFastThrow -Djava.security.egd=file:/dev/urandom -XX:+CMSParallelInitialMarkEnabled -XX:+ParallelRefProcEnabled -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+HeapDumpOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintCompressedOopsMode -XX:-PrintGCApplicationStoppedTime'
\ No newline at end of file
sonar-project.properties
View file @
f0c822a6
sonar.projectKey
=
spring-microservice-exam
sonar.projectName
=
spring-microservice-exam
sonar.projectVersion
=
3.
4
.0
sonar.projectVersion
=
3.
5
.0
sonar.sources
=
sonar.binaries
=
bin
sonar.language
=
java
...
...
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