From f878049bd8de29675e5a1a59c2420ea454d85df9 Mon Sep 17 00:00:00 2001 From: liyunfengfengfeng <2305743208@qq.com> Date: Sun, 4 Mar 2018 16:56:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=99=BB=E5=BD=95=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=BC=82=E6=AD=A5=E6=8F=90=E4=BA=A4=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=20=E8=A7=A3=E5=86=B3ajax=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B9=B1=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yingjun/ssm/web/UserController.java | 7 +- src/main/webapp/WEB-INF/jsp/common/head.jsp | 6 -- src/main/webapp/WEB-INF/jsp/common/tag.jsp | 6 -- src/main/webapp/WEB-INF/jsp/goodslist.jsp | 85 ------------------- .../webapp/WEB-INF/jsp/user/userLogin.jsp | 18 +++- src/main/webapp/WEB-INF/jsp/userlist.jsp | 42 --------- 6 files changed, 19 insertions(+), 145 deletions(-) delete mode 100644 src/main/webapp/WEB-INF/jsp/common/head.jsp delete mode 100644 src/main/webapp/WEB-INF/jsp/common/tag.jsp delete mode 100644 src/main/webapp/WEB-INF/jsp/goodslist.jsp delete mode 100644 src/main/webapp/WEB-INF/jsp/userlist.jsp diff --git a/src/main/java/com/yingjun/ssm/web/UserController.java b/src/main/java/com/yingjun/ssm/web/UserController.java index 96fd8a4..c945fbf 100644 --- a/src/main/java/com/yingjun/ssm/web/UserController.java +++ b/src/main/java/com/yingjun/ssm/web/UserController.java @@ -8,7 +8,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; - +import org.springframework.web.bind.annotation.ResponseBody; /** @@ -25,10 +25,11 @@ public class UserController { * 用户登录 * @return */ - @RequestMapping(value = "/userLogin") + @ResponseBody + @RequestMapping(value = "/userLogin",produces="text/html;charset=UTF-8") public String userLogin(@ModelAttribute User user) { LOG.info("表单提交的用户信息:" + user.toString()); - return "/user/userLogin"; + return "登录成功"; } /** diff --git a/src/main/webapp/WEB-INF/jsp/common/head.jsp b/src/main/webapp/WEB-INF/jsp/common/head.jsp deleted file mode 100644 index 8c5a126..0000000 --- a/src/main/webapp/WEB-INF/jsp/common/head.jsp +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/common/tag.jsp b/src/main/webapp/WEB-INF/jsp/common/tag.jsp deleted file mode 100644 index 76c604a..0000000 --- a/src/main/webapp/WEB-INF/jsp/common/tag.jsp +++ /dev/null @@ -1,6 +0,0 @@ -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<% - request.setCharacterEncoding("utf-8"); - String path = request.getContextPath(); -%> \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/goodslist.jsp b/src/main/webapp/WEB-INF/jsp/goodslist.jsp deleted file mode 100644 index a4a8c1f..0000000 --- a/src/main/webapp/WEB-INF/jsp/goodslist.jsp +++ /dev/null @@ -1,85 +0,0 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java"%> -<%@include file="common/tag.jsp"%> - - - -商品列表 -<%@include file="common/head.jsp"%> - - -
-
-
-

商品列表

-
-
- - - - - - - - - - - - - - - - - - - - - - - -
商品ID商品名称商品价格商品状态商品数量操作
${goods.goodsId}${goods.title}${goods.price}已下架 销售中${goods.number}
- -
-
-
- - - <%--登录弹出层 输入电话--%> - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/user/userLogin.jsp b/src/main/webapp/WEB-INF/jsp/user/userLogin.jsp index b2f3fca..615e59a 100644 --- a/src/main/webapp/WEB-INF/jsp/user/userLogin.jsp +++ b/src/main/webapp/WEB-INF/jsp/user/userLogin.jsp @@ -40,7 +40,7 @@

用户登录

-
+