兼容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

@ -48,6 +48,11 @@ public class RandCodeImageServlet extends HttpServlet {
*/
private static final int lineWidth = 2;
public RandCodeImageServlet() {
// 兼容linux图形处理
System.setProperty("java.awt.headless", "true");
}
@Override
public void doGet(final HttpServletRequest request,
final HttpServletResponse response) throws ServletException,