首页 > 应用开发 > Java > flowable 工作流生成的png图片汉字乱码
flowable 流程图片中文乱码
1.springboot添加配置类,指定字体类型为宋体
package org.fh.config; import org.flowable.spring.SpringProcessEngineConfiguration; import org.flowable.spring.boot.EngineConfigurationConfigurer; import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Controller; /** * 说明:Flowable配置 * 作者:FH Admin * from:fhadmin.cn */ @Controller @Configuration public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> { @Override public void configure(SpringProcessEngineConfiguration engineConfiguration) { engineConfiguration.setActivityFontName("宋体"); engineConfiguration.setLabelFontName("宋体"); engineConfiguration.setAnnotationFontName("宋体"); } }
2. 操作系统字体库,有宋体字体资源。 windows操作系统基本都有宋体,linux等一般没有,需要自行添加
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31558068/viewspace-2885429/ ,如需转载,请注明出处,否则将追究法律责任。
注册时间:2018-10-12