1. Font Provider contains zero fonts. At least one font shall be present 此问题出现的原因是 字体设置不成功,解决方法就是排查设置字体的代码。 需要特别注意的是项目打包后项目中所有文件层次会出现变动,使用何种方式获取字体文件会直接影响到字体设置成功与否。这里简单列一下 Spring 获取文件路径的几个实现: 类作用ClassPathResourceSpringboot classpath 路径UrlResourceURL 路径FileSystemResource文件系统路径