소스 검색

Window机器下File.separator不兼容问题修复;

xuxueli 7 년 전
부모
커밋
38f8e6c794

+ 1 - 0
doc/XXL-JOB官方文档.md 파일 보기

1168
 - 5、任务日志表状态字段类型优化;
1168
 - 5、任务日志表状态字段类型优化;
1169
 - 6、[迭代中]脚本任务支持失败重试;
1169
 - 6、[迭代中]脚本任务支持失败重试;
1170
 - 7、告警邮箱支持SSL配置;
1170
 - 7、告警邮箱支持SSL配置;
1171
+- 8、Window机器下File.separator不兼容问题修复;
1171
 
1172
 
1172
 
1173
 
1173
 ### TODO LIST
1174
 ### TODO LIST

+ 3 - 1
xxl-job-core/src/main/java/com/xxl/job/core/handler/impl/ScriptJobHandler.java 파일 보기

8
 import com.xxl.job.core.util.ScriptUtil;
8
 import com.xxl.job.core.util.ScriptUtil;
9
 import com.xxl.job.core.util.ShardingUtil;
9
 import com.xxl.job.core.util.ShardingUtil;
10
 
10
 
11
+import java.io.File;
12
+
11
 /**
13
 /**
12
  * Created by xuxueli on 17/4/27.
14
  * Created by xuxueli on 17/4/27.
13
  */
15
  */
41
 
43
 
42
         // make script file
44
         // make script file
43
         String scriptFileName = XxlJobFileAppender.getGlueSrcPath()
45
         String scriptFileName = XxlJobFileAppender.getGlueSrcPath()
44
-                .concat("/")
46
+                .concat(File.separator)
45
                 .concat(String.valueOf(jobId))
47
                 .concat(String.valueOf(jobId))
46
                 .concat("_")
48
                 .concat("_")
47
                 .concat(String.valueOf(glueUpdatetime))
49
                 .concat(String.valueOf(glueUpdatetime))

+ 1 - 1
xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java 파일 보기

79
 
79
 
80
 		// filePath/yyyy-MM-dd/9999.log
80
 		// filePath/yyyy-MM-dd/9999.log
81
 		String logFileName = logFilePath.getPath()
81
 		String logFileName = logFilePath.getPath()
82
-				.concat("/")
82
+				.concat(File.separator)
83
 				.concat(String.valueOf(logId))
83
 				.concat(String.valueOf(logId))
84
 				.concat(".log");
84
 				.concat(".log");
85
 		return logFileName;
85
 		return logFileName;