This commit is contained in:
zyy239969 2023-07-20 23:02:57 +08:00
parent 5e4d683e88
commit b5770e4b11
1 changed files with 2 additions and 1 deletions

View File

@ -147,7 +147,8 @@ public class RecruitmentServiceImpl extends BaseService<RecruitmentMapper, Recru
// 本地获取模板路径 // 本地获取模板路径
// tf = new File(URLDecoder.decode(Objects.requireNonNull( // tf = new File(URLDecoder.decode(Objects.requireNonNull(
// Thread.currentThread().getContextClassLoader().getResource("doc/app.docx")).getPath(), "UTF-8")); // Thread.currentThread().getContextClassLoader().getResource("doc/app.docx")).getPath(), "UTF-8"));
tf = new File(ResourceUtils.getURL("classpath:doc/app.docx").getPath()); tf = new File(ResourceUtils.getURL("/mnt/demo26.ydool.net/doc/象山县国有企业人员招聘报备表.docx").getPath());
System.out.println("tf.getPath() = " + tf.getPath()); System.out.println("tf.getPath() = " + tf.getPath());
// } catch (UnsupportedEncodingException e) { // } catch (UnsupportedEncodingException e) {
// throw new RuntimeException(e); // throw new RuntimeException(e);