Commit 1c39b1fe authored by 李丛阳's avatar 李丛阳

变量

parent 4b98f49b
......@@ -17,7 +17,10 @@ import org.rcisoft.core.util.UploadUtil;
import org.rcisoft.core.util.UserUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import java.util.Map;
......@@ -113,7 +116,7 @@ public class BCarouselController extends PaginationController<BCarousel> {
String path = global.getBASE_UPLOAD_SERVER_LOCATION();
String sl_logo_path = global.getIMAGE_LOCATION()+global.getIMAGES_LOCATION();
boolean type = false;
if((global.getSERVER_LINUX()).equals(global.getIS_SERVER_LINUX())){
if("1".equals(global.getIS_SERVER_LINUX())){
type = true;
}
Map<String, Object> uploadResult = UploadUtil.picImport(path, sl_logo_path, file, type);
......
......@@ -12,7 +12,6 @@ import org.rcisoft.business.bchapter.dto.ScoreInfoDTO;
import org.rcisoft.business.bchapter.entity.BChapter;
import org.rcisoft.business.bchapter.enums.IsCompleteEnum;
import org.rcisoft.business.bchapter.service.BChapterService;
import org.rcisoft.business.brslstudent.service.BRSlStudentService;
import org.rcisoft.business.bsl.service.BSlService;
import org.rcisoft.common.component.Global;
import org.rcisoft.common.controller.PaginationController;
......@@ -23,17 +22,13 @@ import org.rcisoft.core.enums.RoleFlagEnum;
import org.rcisoft.core.exception.ServiceException;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.result.Result;
import org.rcisoft.core.result.ResultCode;
import org.rcisoft.core.result.ResultServiceEnums;
import org.rcisoft.core.util.UploadUtil;
import org.rcisoft.core.util.UserUtil;
import org.rcisoft.sys.role.dao.SysRoleRepository;
import org.rcisoft.sys.role.entity.SysRole;
import org.rcisoft.sys.user.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.context.request.async.WebAsyncTask;
......@@ -120,7 +115,7 @@ public class BChapterController extends PaginationController<BChapter> {
String path = global.getMD_FILE_LOCATION();
String basePath = global.getBASE_UPLOAD_SERVER_LOCATION();
boolean type = false;
if((global.getSERVER_LINUX()).equals(global.getIS_SERVER_LINUX())){
if("1".equals(global.getIS_SERVER_LINUX())){
type = true;
}
Map<String, Object> pic = UploadUtil.picImport(basePath, path, image, type);
......
......@@ -3,7 +3,6 @@ package org.rcisoft.business.blesson.controller;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.Get;
import org.rcisoft.business.blesson.entity.BLesson;
import org.rcisoft.business.blesson.service.BLessonService;
import org.rcisoft.common.component.Global;
......@@ -14,22 +13,21 @@ import org.rcisoft.core.converter.MultipartFile2HSSFWorkbookConverter;
import org.rcisoft.core.exception.ServiceException;
import org.rcisoft.core.model.PersistModel;
import org.rcisoft.core.result.Result;
import org.rcisoft.core.result.ResultCode;
import org.rcisoft.core.result.ResultServiceEnums;
import org.rcisoft.core.util.UploadUtil;
import org.rcisoft.core.util.UserUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid;
import java.util.Map;
import static org.springframework.web.bind.annotation.RequestMethod.GET;
/**
* Created by CodeGenerator on 2017/07/12.
*/
......@@ -102,7 +100,7 @@ public class BLessonController extends PaginationController<BLesson> {
String path = global.getBASE_UPLOAD_SERVER_LOCATION();
String course_logo_path =global.getIMAGE_LOCATION()+global.getCOURCE_LOGO_LOCATION();
boolean type = false;
if((global.getSERVER_LINUX()).equals(global.getIS_SERVER_LINUX())){
if("1".equals(global.getIS_SERVER_LINUX())){
type = true;
}
Map<String,Object> map= UploadUtil.picImport(path,course_logo_path,importFile,type);
......
......@@ -3,7 +3,6 @@ package org.rcisoft.business.bsl.controller;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.business.blesson.entity.BLesson;
import org.rcisoft.business.bsl.dto.SlDetailDTO;
import org.rcisoft.business.bsl.entity.BSl;
import org.rcisoft.business.bsl.service.BSlService;
......@@ -21,14 +20,12 @@ import org.rcisoft.core.util.UploadUtil;
import org.rcisoft.core.util.UserUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;
/**
......@@ -163,7 +160,7 @@ public class BSlController extends PaginationController<BSl> {
String path = global.getBASE_UPLOAD_SERVER_LOCATION();
String sl_logo_path = global.getIMAGE_LOCATION() + global.getLANCH_LOGO_LOCATION();
boolean type = false;
if((global.getSERVER_LINUX()).equals(global.getIS_SERVER_LINUX())){
if("1".equals(global.getIS_SERVER_LINUX())){
type = true;
}
Map<String, Object> uploadResult = UploadUtil.picImport(path, sl_logo_path, cover,type);
......
......@@ -24,14 +24,12 @@ public class Global {
*/
static Map<String, String> map = Maps.newHashMap();
/*服务器地址*/
@Value("${global.other.server_url}")
private String SERVER_URL;
/*服务器保存图片路径*/
@Value("${global.other.server_linux}")
private String SERVER_LINUX;
/*服务器保存图片路径*/
@Value("${global.path.base_upload_server_location}")
private String BASE_UPLOAD_SERVER_LOCATION;
......@@ -113,7 +111,7 @@ public class Global {
private String MD_FILE_LOCATION;
/*登录验证秘钥*/
@Value("${global.other.login_secert_key}")
@Value("${global.jwt.login_secert_key}")
private String LOGIN_SECERT_KEY;
@Value("${jwt.header}")
......
......@@ -69,6 +69,7 @@ jwt:
secret: mySecret
expiration: 604800
tokenHead: "Bearer "
login_secert_key: "base64EncodedSecretKey"
route:
authentication:
path: "/login"
......@@ -121,11 +122,8 @@ global:
che_project_init_location: /working/dockervolume/chedir/project
other:
server_url: http://gwf.natapp.cc/eduServer
server_linux: 1
login_secert_key: "base64EncodedSecretKey"
is_server_linux: 5
is_server_linux: 1
max_code_length: 15
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