权限管理——by SmallQian(不得用于商业用途)
= @UniqueConstraint(columnNames = \)) publicclass WebMenu {
private Integer webMenuId; private String webMenuName; private String webMenuInfo; private String webMenuDiv;
private String menuItemIdArray; private Integer rootMenu;
private Integer menuLevel;//菜单级数 @Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name = \,unique=true,nullable = false ) public Integer getWebMenuId() { returnwebMenuId; }
publicvoid setWebMenuId(Integer webMenuId) { this.webMenuId = webMenuId; }
@Column(name = \) public String getWebMenuName() { returnwebMenuName; }
publicvoid setWebMenuName(String webMenuName) { this.webMenuName = webMenuName; }
@Column(name = \) public String getWebMenuInfo() { returnwebMenuInfo; }
publicvoid setWebMenuInfo(String webMenuInfo) { this.webMenuInfo = webMenuInfo; }
@Column(name = \) public String getWebMenuDiv() { returnwebMenuDiv; }
publicvoid setWebMenuDiv(String webMenuDiv) { this.webMenuDiv = webMenuDiv; }
@Column(name = \) public String getMenuItemIdArray() { returnmenuItemIdArray;
版权所属——QQW.NULL
权限管理——by SmallQian(不得用于商业用途)
}
}
publicvoid setMenuItemIdArray(String menuItemIdArray) { this.menuItemIdArray = menuItemIdArray; }
@Column(name = \)
public Integer getRootMenu() { returnrootMenu; }
publicvoid setRootMenu(Integer rootMenu) { this.rootMenu = rootMenu; }
@Column(name = \)
public Integer getMenuLevel() { returnmenuLevel; }
publicvoid setMenuLevel(Integer menuLevel) { this.menuLevel = menuLevel; }
版权所属——QQW.NULL
权限管理——by SmallQian(不得用于商业用途)
5、在mysal数据库中建立WebSoleSystem数据库
6、将项目部署到tomcat上运行,数据库中便会生产bean中的四张表
版权所属——QQW.NULL
权限管理——by SmallQian(不得用于商业用途)
3)完成用户登陆界面
1、在src/main/webapp/WEB-INF下创建views文件夹并将loginView.jsp拷贝在views下
2、在src/main/webapp下将bootstrap的css(js)文件复制粘贴在该目录下
3、在控制层(controller)中建立ViewsController.java类实现界面视图的请求调用
@Controller
版权所属——QQW.NULL
权限管理——by SmallQian(不得用于商业用途)
publicclass ViewsController {
@RequestMapping(value =\) @ResponseBody
public ModelAndView loginView(){
ModelAndView view = newModelAndView(\); return view; } }
4、浏览器运行结果
版权所属——QQW.NULL