問題描述:在注冊頁面邏輯實現是,時時無法獲取頁面的填寫的注冊信息,查找許多資料終於解決;
<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最終問題迎刃而解