Commit 701b2b03 authored by 李丛阳's avatar 李丛阳

修复冗余代码

parent b6023e9f
......@@ -3,3 +3,5 @@
.settings/*
.classpath
.project
target/*
*.DS_Store
\ No newline at end of file
......@@ -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;
}
......@@ -55,12 +55,15 @@ public class FileController<T> extends PaginationController<T> {
finalSavingPath = savingAbsolutePath + SEPARATOR + savingPatternOrFullName;
}
File file = new File(finalSavingPath);
if(!file.mkdirs()) {
file.mkdirs();
File dir = new File(savingAbsolutePath);
if(!dir.exists()) {
dir.mkdirs();
}
File file = new File(finalSavingPath);
try {
if(!file.exists()) {
file.createNewFile();
}
multipartFile.transferTo(file);
} catch (IllegalStateException var10) {
var10.printStackTrace();
......
......@@ -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
\ No newline at end of file
teacher: ROLE_1002
student: ROLE_1003
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment