无法从mongodb打开ttf文件

无法打开位于mongo(即外部http位置)中的ttf文件

但是,如果我们从本地系统提供位置信息,就可以正常工作

例如:

File file  = new File("resources");
Font font = FontFactory.getFont(file.getcanonicalPath()+"/cambria.ttf");

font返回一个对象

但是

Font font = FontFactory.getFont("http://10.******/cambria.ttf");

font返回null,导致IOException无法打开文件

但是文件可以在该位置找到

a714618777 回答:无法从mongodb打开ttf文件

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3124158.html

大家都在问