1、activiti-cfg.xml的修改,添加activityFontName和labelFontName属性
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"> <property name="dataSource" ref="dataSource"/> <property name="transactionManager" ref="transactionManager"/> <property name="databaseSchemaUpdate" value="false"/> <!--设置字体 防止乱码--> <property name="activityFontName" value="宋体"/> <property name="labelFontName" value="宋体"/> <!-- 用于更改流程节点的执行行为 --> <property name="activityBehaviorFactory" ref="activityBehaviorFactoryExt"/> <!-- mail --> <property name="mailServerHost" value="localhost"/> <property name="mailServerUsername" value="kafeitu"/> <property name="mailServerPassword" value="000000"/> <property name="mailServerPort" value="2025"/> <property name="customFormTypes"> <list> <bean class="org.activiti.explorer.form.UserFormType"/> <bean class="org.activiti.explorer.form.ProcessDefinitionFormType"/> <bean class="org.activiti.explorer.form.MonthFormType"/> </list> </property> <!-- 自动部署 --> <!--<property name="deploymentResources">--> <!--<list>--> <!--<value>classpath*:/deployments/*.bpmn20.xml</value>--> <!--</list>--> <!--</property>--> <!-- UUID作为主键生成策略--> <!--<property name="idGenerator" ref="uuidGenerator"/>--> </bean>
2、修改tomcat的java启动编码为UTF-8 : 在catalina.bat中添加JAVA_OPTS参数
set JAVA_OPTS=-Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8
放在第一行后面