问题描述:在注册页面逻辑实现是,时时无法获取页面的填写的注册信息,查找许多资料终于解决;
<form class="login_form" name = "login" method="post" action="/register" content="application">
<h1 class="login_title">用户注册</h1>
<input type="text" placeholder="用户名" class="input_txt" name="userName">
<input type="password" placeholder="密码" class="input_txt" name = "password">
<input type="submit" value="注 册" class="input_sub">
</form>
因为客户端发送请求的content-type为 text/plain,最后是把发送请求的content-type 改成了 application/x-www-form-urlencoded最终问题迎刃而解