排查读取文件异常

develop
PL 4 months ago
parent 472ad1589b
commit abb7d9a136

@ -310,6 +310,7 @@ public class ChatMessageServiceImpl implements ChatMessageService {
File file = null;
try {
file = new File(ClassLoader.getSystemResource("Json/ChatModel.json").getPath()); //相对路径获取文件信息
//File file = new File("src/main/resources/Json/ChatModel.json"); //绝对路径获取文件信息
} catch (Exception e) {
throw new ServiceException(ErrorCode.OPERATION_ERROR.getCode(), "读取文件" + Arrays.toString(e.getStackTrace()));

Loading…
Cancel
Save