兼容linux图形处理

兼容linux图形处理
pull/17/head
joriewong 2017-08-08 15:22:29 +08:00 committed by GitHub
parent 7a8209da66
commit 499f7501c8
1 changed files with 6 additions and 1 deletions

View File

@ -47,6 +47,11 @@ public class RandCodeImageServlet extends HttpServlet {
* 线=1.414*lineWidth
*/
private static final int lineWidth = 2;
public RandCodeImageServlet() {
// 兼容linux图形处理
System.setProperty("java.awt.headless", "true");
}
@Override
public void doGet(final HttpServletRequest request,
@ -234,4 +239,4 @@ enum RandCodeImageEnum {
return charStr;
}
}
}