From a4e61fd6331f01e46f6e8f1cd3b3f606bf10ca8a Mon Sep 17 00:00:00 2001 From: synchronized Date: Wed, 25 Jul 2018 20:52:29 +0800 Subject: [PATCH] update code --- .classpath | 8 ----- .idea/compiler.xml | 2 +- .project | 23 ------------- .settings/org.eclipse.core.resources.prefs | 2 -- .settings/org.eclipse.jdt.core.prefs | 12 ------- .settings/org.eclipse.m2e.core.prefs | 4 --- EasyCaptcha.iml | 2 +- pom.xml | 12 +++++++ src/main/java/com/wf/captcha/Encoder.java | 1 + .../wf/captcha/servlet/CaptchaServlet.java | 34 +++++++++---------- 10 files changed, 32 insertions(+), 68 deletions(-) delete mode 100644 .classpath delete mode 100644 .project delete mode 100644 .settings/org.eclipse.core.resources.prefs delete mode 100644 .settings/org.eclipse.jdt.core.prefs delete mode 100644 .settings/org.eclipse.m2e.core.prefs diff --git a/.classpath b/.classpath deleted file mode 100644 index a004055..0000000 --- a/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/.idea/compiler.xml b/.idea/compiler.xml index b151697..0a3aa2a 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -10,7 +10,7 @@ - + \ No newline at end of file diff --git a/.project b/.project deleted file mode 100644 index 1ec0be0..0000000 --- a/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - EasyCaptcha - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 6249222..0000000 --- a/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f..0000000 --- a/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/EasyCaptcha.iml b/EasyCaptcha.iml index 889624d..0317dc6 100644 --- a/EasyCaptcha.iml +++ b/EasyCaptcha.iml @@ -1,6 +1,6 @@ - + diff --git a/pom.xml b/pom.xml index f8a9e1c..660684f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,6 +4,18 @@ EasyCaptcha EasyCaptcha 1.1.0-RELEASE + + + + org.apache.maven.plugins + maven-compiler-plugin + + 6 + 6 + + + + EasyCaptcha diff --git a/src/main/java/com/wf/captcha/Encoder.java b/src/main/java/com/wf/captcha/Encoder.java index 6dd15b6..f934d4a 100644 --- a/src/main/java/com/wf/captcha/Encoder.java +++ b/src/main/java/com/wf/captcha/Encoder.java @@ -1,4 +1,5 @@ package com.wf.captcha; + import java.io.IOException; import java.io.OutputStream; diff --git a/src/main/java/com/wf/captcha/servlet/CaptchaServlet.java b/src/main/java/com/wf/captcha/servlet/CaptchaServlet.java index 94a657c..ee5d777 100644 --- a/src/main/java/com/wf/captcha/servlet/CaptchaServlet.java +++ b/src/main/java/com/wf/captcha/servlet/CaptchaServlet.java @@ -11,28 +11,28 @@ import com.wf.captcha.utils.CaptchaUtil; /** * 验证码servlet - * + * * @author wangfan * @date 2018-5-14 上午9:53:01 */ public class CaptchaServlet extends HttpServlet { - private static final long serialVersionUID = -90304944339413093L; + private static final long serialVersionUID = -90304944339413093L; - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - // 是否有key决定是存在session中还是servletContext中 - String key = request.getParameter("key"); - CaptchaUtil cu = new CaptchaUtil(); - if (key != null && !key.trim().isEmpty()) { - cu.out(key, request, response); - } else { - cu.out(request, response); - } - } + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + // 是否有key决定是存在session中还是servletContext中 + String key = request.getParameter("key"); + CaptchaUtil cu = new CaptchaUtil(); + if (key != null && !key.trim().isEmpty()) { + cu.out(key, request, response); + } else { + cu.out(request, response); + } + } - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - doGet(request, response); - } + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + doGet(request, response); + } }