Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projectArtifacture
Project
Project
Details
Activity
Releases
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
yangzhaojun
projectArtifacture
Commits
701b2b03
Commit
701b2b03
authored
Feb 24, 2018
by
李丛阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复冗余代码
parent
b6023e9f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
61 deletions
+39
-61
.gitignore
.gitignore
+3
-1
Global.java
src/main/java/org/rcisoft/common/component/Global.java
+28
-40
FileController.java
...main/java/org/rcisoft/core/controller/FileController.java
+7
-4
application-dev.yml
src/main/resources/application-dev.yml
+1
-10
application-prod.yml
src/main/resources/application-prod.yml
+0
-6
No files found.
.gitignore
View file @
701b2b03
...
...
@@ -2,4 +2,6 @@
*.iml
.settings/*
.classpath
.project
\ No newline at end of file
.project
target/*
*.DS_Store
\ No newline at end of file
src/main/java/org/rcisoft/common/component/Global.java
View file @
701b2b03
...
...
@@ -26,63 +26,51 @@ public class Global implements Serializable{
*/
static
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
/*视频路径*/
@Value
(
"${global.path.video_location}"
)
private
String
VIDEO_LOCATION
;
/*旧视频路径*/
@Value
(
"${global.path.temp_location}"
)
private
String
TEMP_LOCATION
;
/*附件路径*/
@Value
(
"${global.path.file_location}"
)
private
String
FILE_LOCATION
;
/*图片路径*/
@Value
(
"${global.path.images_location}"
)
private
String
IMAGES_LOCATION
;
/*登录验证秘钥*/
@Value
(
"${global.other.login_secert_key}"
)
private
String
LOGIN_SECERT_KEY
;
/**
* jwt
*/
@Value
(
"${jwt.header}"
)
private
String
JWT_HEADER
;
@Value
(
"${jwt.tokenHead}"
)
private
String
JWT_TOKEN_HEAD
;
/*gitlab管理员秘钥*/
@Value
(
"${global.other.session_admin_header_value}"
)
private
String
SESSION_ADMIN_HEADER_VALUE
;
/*password最小长度*/
@Value
(
"${global.password.min_password}"
)
private
String
PASSWORD_MIN_PASSWORD
;
/*password最大长度*/
@Value
(
"${global.password.max_password}"
)
private
String
PASSWORD_MAX_PASSWORD
;
/*管理员Code*/
@Value
(
"${global.code.admin}"
)
private
String
adminCode
;
/*教师Code*/
@Value
(
"${global.code.teacher}"
)
private
String
teacherCode
;
/*学生Code*/
@Value
(
"${global.code.student}"
)
private
String
studentCode
;
/*client Code*/
@Value
(
"${global.code.client}"
)
private
String
clientCode
;
/**
* 基本存储路径
*/
@Value
(
"${global.path.base_upload_location}"
)
private
String
baseUploadLocation
;
/*
* 代码
*/
@Value
(
"${global.path.code_generate_location}"
)
private
String
codeGenerateLocation
;
/*视频路径*/
@Value
(
"${global.path.video_location}"
)
private
String
VIDEO_LOCATION
;
/*临时路径*/
@Value
(
"${global.path.temp_location}"
)
private
String
TEMP_LOCATION
;
/*附件路径*/
@Value
(
"${global.path.file_location}"
)
private
String
FILE_LOCATION
;
/*图片路径*/
@Value
(
"${global.path.images_location}"
)
private
String
IMAGES_LOCATION
;
}
src/main/java/org/rcisoft/core/controller/FileController.java
View file @
701b2b03
...
...
@@ -55,12 +55,15 @@ public class FileController<T> extends PaginationController<T> {
finalSavingPath
=
savingAbsolutePath
+
SEPARATOR
+
savingPatternOrFullName
;
}
File
file
=
new
File
(
finalSaving
Path
);
if
(!
file
.
mkdir
s
())
{
file
.
mkdirs
();
File
dir
=
new
File
(
savingAbsolute
Path
);
if
(!
dir
.
exist
s
())
{
dir
.
mkdirs
();
}
File
file
=
new
File
(
finalSavingPath
);
try
{
if
(!
file
.
exists
())
{
file
.
createNewFile
();
}
multipartFile
.
transferTo
(
file
);
}
catch
(
IllegalStateException
var10
)
{
var10
.
printStackTrace
();
...
...
src/main/resources/application-dev.yml
View file @
701b2b03
...
...
@@ -78,9 +78,6 @@ jwt:
register
:
"
/register"
global
:
password
:
min_password
:
6
max_password
:
16
path
:
base_upload_location
:
/working/resource/eduServer/
code_generate_location
:
/code
...
...
@@ -88,11 +85,5 @@ global:
temp_location
:
/temp
file_location
:
/file
images_location
:
/images
other
:
login_secert_key
:
"
base64EncodedSecretKey"
session_admin_header_value
:
pYez25-y7nqPfm9seY2S
code
:
admin
:
ROLE_1001
teacher
:
ROLE_1002
student
:
ROLE_1003
admin
:
ROLE_1001
\ No newline at end of file
src/main/resources/application-prod.yml
View file @
701b2b03
...
...
@@ -60,17 +60,11 @@ jwt:
register
:
"
auth/register"
global
:
password
:
min_password
:
6
max_password
:
16
path
:
video_location
:
/video
temp_location
:
/temp
file_location
:
/file
images_location
:
/images
other
:
login_secert_key
:
"
base64EncodedSecretKey"
session_admin_header_value
:
pYez25-y7nqPfm9seY2S
code
:
admin
:
ROLE_1001
teacher
:
ROLE_1002
...
...
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