<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户注册</title>
<link rel="stylesheet" type="text/css" href="${path}/resources/css/bootstrap.min.css" />
</head>
<body>
<form action="${path}/register" method="post" enctype="multipart/form-data">
<table class="table">
<tr>
<td>用户名</td>
<td><input type="text" name="customer_name" id="customer_name" /></td>
</tr>
<tr>
<td>用户密码</td>
<td><input type="password" name="customer_pwd" id="customer_pwd" /></td>
</tr>
<tr>
<td>真实姓名</td>
<td><input type="text" name="customer_rname" id="customer_rname" /></td>
</tr>
<tr>
<td>性别</td>
<td>
<input type="radio" name="customer_gender" id="customer_gender1" value="m" checked="checked" />
<label for="customer_gender1">男</label>
<input type="radio" name="customer_gender" id="customer_gender2" value="w" />
<label for="customer_gender2">女</label>
</td>
</tr>
<tr>
<td>联系电话</td>
<td><input type="text" name="customer_phone" id="customer_phone" /></td>
</tr>
<tr>
<td>用户头像</td>
<td><input type="file" name="picfile" id="picfile" /></td>
</tr>
<tr>
<td colspan="2">
<input class="btn btn-danger" type="reset" name="reset" id="reset" value="重置" />
<input class="btn btn-primary" type="submit" name="submit" id="submit" value="确定" />
</td>
</tr>
</table>
</form>
<script src="${path}/resources/js/jquery-1.12.4.min.js"></script>
<script src="${path}/resources/js/bootstrap.min.js"></script>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<!-- 组件扫描 -->
<context:component-scan base-package="com.hm.controller">
<!-- 扫描controller -->
<context:include-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
</context:component-scan>
<!-- 启动mvc注解 -->
<mvc:annotation-driven />
<!-- 静态资源放行 -->
<mvc:resources location="/resources/" mapping="/resources/**" />
<!-- 文件上传 -->
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- 文件最大5M -->
<property name="maxUploadSize" value="5242880" />
<!-- 默认编码UTF-8 -->
<property name="defaultEncoding" value="UTF-8" />
<!-- 延迟加载 -->
<property name="resolveLazily" value="true" />
</bean>
<!-- 配置视图解析器 -->
<bean id="jspViewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/page/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>