wangwei 5 lat temu
rodzic
commit
b4c8e47802

+ 4 - 4
src/main/java/cn/com/qmth/examcloud/web/config/SystemConfig.java → src/main/java/cn/com/qmth/examcloud/web/config/SystemProperties.java

@@ -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));
 		}