activiti模型编辑器乱码问题
解决方式
1.设置ProcessEngineConfigurationConfigurer配置的字体名称为宋体(以下为Spring boot中配置的方法)
/**
* activiti 配置
* @author gaolj
*/
@Configuration
public class ActivitiConfig implements ProcessEngineConfigurationConfigurer {
/**
* 解决工作流生成图片乱码问题
* @param springProcessEngineConfiguration springProcessEngineConfiguration
*/
@Override
public void configure(SpringProcessEngineConfiguration springProcessEngineConfiguration) {
springProcessEngineConfiguration.setActivityFontName("宋体");
springProcessEngineConfiguration.setAnnotationFontName("宋体");
springProcessEngineConfiguration.setLabelFontName("宋体");
}
}
2.如果项目是部署再tomcat上,则设置tomcat参数 -Dfile.encoding=UTF-8