|
@@ -18,7 +18,7 @@ import cn.com.qmth.examcloud.web.support.ClasspathHelper;
|
|
|
*/
|
|
|
@Component
|
|
|
@ConfigurationProperties("examcloud.web.sys")
|
|
|
-public class SystemConfig {
|
|
|
+public class SystemProperties {
|
|
|
|
|
|
private String dataDir;
|
|
|
|
|
@@ -28,16 +28,16 @@ public class SystemConfig {
|
|
|
* 构造函数
|
|
|
*
|
|
|
*/
|
|
|
- public SystemConfig() {
|
|
|
-
|
|
|
- String classpath = ClasspathHelper.getClasspath();
|
|
|
+ public SystemProperties() {
|
|
|
|
|
|
if (StringUtils.isBlank(dataDir)) {
|
|
|
+ String classpath = ClasspathHelper.getClasspath();
|
|
|
String path = new File(classpath).getParent() + File.separator + "data";
|
|
|
dataDir = PathUtil.getCanonicalPath(new File(path));
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isBlank(tempDataDir)) {
|
|
|
+ String classpath = ClasspathHelper.getClasspath();
|
|
|
String path = new File(classpath).getParent() + File.separator + "temp";
|
|
|
tempDataDir = PathUtil.getCanonicalPath(new File(path));
|
|
|
}
|