ssm整合的登录
新建一个web工程,主要结构如下: 数据库创建如下: 控制层的代码FormController 类 package codeRose.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; //动态页面跳转控制器 @Controller public class FormController { @RequestMapping(value="/{formName}") public String loginForm(@PathVariable String formName){ return formName; } } 控制层UserController 主要注意view.setViewName("success");的跳转。 package codeRose.controller; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation