猿问
下载APP

java课程设计问题!

向大神们求救!!做课设有一步不知道怎么办了,就是在做用户登录界面时候,怎么能使不同身份的人进入到不同的界面中

Our2
浏览 7513回答 7
7回答

牛津小学徒

给用户设个level属性,可以根据不同的level进行跳转

倔强的小朱朱

可以给每种类型的人添加一个独特的标识,在用户登录的时候,判断是哪类人,分别跳转到相应的页面就可以了啊

慕莱坞4347929

爱上对方过后............................................................................................................................................................

慕莱坞4347929

可以给每种类型的人添加一个独特的标识,在用户登录的时候,判断是哪类人,分别跳转到相应的页面就可以了啊https://www.packtpub.com/catalogsearch/result?q=%E9%A6%99%E6%B8%AF%E7%9A%84%E6%8A%A2%E5%BA%97%E4%B8%80%E6%9D%A1%E8%A1%97%E3%80%9094003011.%E7%AD%98%E3%80%91EoZhttps://www.packtpub.com/catalogsearch/result?q=%E9%A6%99%E6%B8%AF%E6%8A%A2%E6%94%AF%E5%90%88%E6%B3%95%E5%90%97%E3%80%9094003011.%E7%AD%98%E3%80%91cO1https://www.packtpub.com/catalogsearch/result?q=64%E5%92%8C54%E5%BC%8F%E7%9A%84%E8%81%94%E7%B3%BB%E6%96%B9%E5%BC%8F%E3%80%9094003011.%E7%AD%98%E3%80%91CFihttps://www.packtpub.com/catalogsearch/result?q=%E4%BA%94%E8%BF%9E%E5%8F%91%E5%B0%8F%E5%8F%A3%E5%BE%84%E5%9B%BD%E9%99%85%E8%B5%B0%E7%A7%81%E3%80%9094003011.%E7%AD%98%E3%80%91HZKhttps://www.packtpub.com/catalogsearch/result?q=%E8%B0%81%E6%9C%89%E7%A7%83%E5%AD%90%E5%BE%AE%E4%BF%A1%E3%80%9094003011.%E7%AD%98%E3%80%91xLLhttps://www.packtpub.com/catalogsearch/result?q=%E7%A7%83%E5%AD%90%E6%9D%BF%E7%90%83+pcp+%E5%90%A7%E3%80%9094003011.%E7%AD%98%E3%80%91Bkfhttps://www.packtpub.com/catalogsearch/result?q=%E6%BF%80%E5%85%89%E6%89%93%E9%B8%9F%E5%99%A8%E8%81%94%E7%B3%BB%E7%94%B5%E8%AF%9D%E3%80%9094003011.%E7%AD%98%E3%80%91Dw4https://www.packtpub.com/catalogsearch/result?q=%E6%89%93%E9%B8%9F%E5%B7%A5%E5%85%B7%E5%BE%AE%E4%BF%A1+%E3%80%9094003011.%E7%AD%98%E3%80%91yoohttps://www.packtpub.com/catalogsearch/result?q=%E6%89%93%E9%B8%9F%E7%94%A8%E4%BB%80%E4%B9%88%E5%B7%A5%E5%85%B7%E3%80%9094003011.%E7%AD%98%E3%80%91Rpehttps://www.packtpub.com/catalogsearch/result?q=%E6%89%93%E9%B8%9F%E7%94%A8%E4%BB%80%E4%B9%88%E5%B7%A5%E5%85%B7%E5%A5%BD%E5%91%A2%E3%80%9094003011.%E7%AD%98%E3%80%91GT1https://www.packtpub.com/catalogsearch/result?q=%E7%8E%B0%E5%9C%A8%E6%89%93%E9%B8%9F%E7%94%A8%E4%BB%80%E4%B9%88%E5%B7%A5%E5%85%B7%E5%A5%BD%E3%80%9094003011.%E7%AD%98%E3%80%91cR4https://www.packtpub.com/catalogsearch/result?q=%E5%BC%A9%E6%89%93%E6%96%91%E9%B8%A0%E8%A7%86%E9%A2%91%E3%80%9094003011.%E7%AD%98%E3%80%91x5Hhttps://www.packtpub.com/catalogsearch/result?q=%E7%A7%83%E5%AD%90%E6%89%93%E6%96%91%E9%B8%A0%E8%A7%86%E9%A2%91%E3%80%9094003011.%E7%AD%98%E3%80%91s5phttps://www.packtpub.com/catalogsearch/result?q=%E7%A7%83%E5%AD%90100%E7%B1%B3%E6%89%93%E6%96%91%E9%B8%A0%E3%80%9094003011.%E7%AD%98%E3%80%91XB6https://www.packtpub.com/catalogsearch/result?q=%E7%A7%83%E5%AD%90100%E7%B1%B3%E6%89%93%E9%87%8E%E9%B8%A1%E3%80%9094003011.%E7%AD%98%E3%80%91NAThttps://www.packtpub.com/catalogsearch/result?q=%E7%A7%83%E5%AD%90%E6%89%93%E9%87%8E%E9%B8%A1%E8%A7%86%E9%A2%91%E5%A4%A7%E5%85%A8%E3%80%9094003011.%E7%AD%98%E3%80%91wIOhttps://www.packtpub.com/catalogsearch/result?q=%E6%88%B7%E5%A4%96%E7%A7%83%E5%AD%90%E5%9B%BE%E7%89%87%E5%A4%A7%E5%85%A8%E3%80%9094003011.%E7%AD%98%E3%80%91gc5https://www.packtpub.com/catalogsearch/result?q=%E6%88%B7%E5%A4%96%E7%A7%83%E5%AD%90%E7%8B%A0%E8%B4%A7%E3%80%9094003011.%E7%AD%98%E3%80%91Mvfhttps://www.packtpub.com/catalogsearch/result?q=%E7%A7%83%E5%AD%90%E6%88%B7%E5%A4%96%E7%8E%A9%E5%85%B7%E3%80%9094003011.%E7%AD%98%E3%80%91gHFhttps://www.packtpub.com/catalogsearch/result?q=%E7%A7%83%E5%AD%90%E6%89%93%E7%8C%8E%E3%80%9094003011.%E7%AD%98%E3%80%91Q44https://www.packtpub.com/catalogsearch/result?q=%E7%A7%83%E5%AD%90%E6%89%93%E7%8C%8E%E8%A7%86%E9%A2%91%E5%85%A8%E9%9B%86%E9%87%8E%E9%B8%A1%E3%80%9094003011.%E7%AD%98%E3%80%91ihDhttps://www.packtpub.com/catalogsearch/result?q=%E7%A7%83%E9%85%8D%E4%BB%B6%E5%A4%A7%E5%85%A8+%E3%80%9094003011.%E7%AD%98%E3%80%91EAjhttps://www.packtpub.com/catalogsearch/result?q=%E7%A7%83%E7%9A%84%E9%85%8D%E4%BB%B6%E6%B8%85%E5%8D%95%E3%80%9094003011.%E7%AD%98%E3%80%91WPNhttps://www.packtpub.com/catalogsearch/result?q=%E7%A7%83%E9%B9%B0%E6%B6%88%E9%9F%B3%E5%99%A8%E3%80%9094003011.%E7%AD%98%E3%80%91l4Thttps://www.packtpub.com/catalogsearch/result?q=%E7%A7%83%E5%AD%90%E6%B6%88%E9%9F%B3%E5%99%A8%E3%80%9094003011.%E7%AD%98%E3%80%91oCZhttps://www.packtpub.com/catalogsearch/result?q=%E6%B6%88%E9%9F%B3%E7%A2%97%E5%9B%BE%E7%89%87%E4%BB%B7%E6%A0%BC%E3%80%9094003011.%E7%AD%98%E3%80%91sx2https://www.packtpub.com/catalogsearch/result?q=%E6%9D%BF%E7%90%83%E6%B6%88%E9%9F%B3%E5%99%A8%E5%9B%BE%E7%89%87%E4%BB%B7%E6%A0%BC%E3%80%9094003011.%E7%AD%98%E3%80%91pWNhttps://www.packtpub.com/catalogsearch/result?q=%E4%B8%80%E4%BD%93%E5%85%83%E7%B4%A0%E5%9B%9B%E7%BA%A7%E3%80%9094003011.%E7%AD%98%E3%80%91Od0https://www.packtpub.com/catalogsearch/result?q=%E6%B6%88%E9%9F%B3%E4%BB%B7%E6%A0%BC%E5%9B%BE%E7%89%87%E3%80%9094003011.%E7%AD%98%E3%80%91JKVhttps://www.packtpub.com/catalogsearch/result?q=%E6%89%8B%E7%A7%83%E9%B9%B0%E5%A8%81%E5%8A%9B%EF%BC%8C%E3%80%9094003011.%E7%AD%98%E3%80%91p11https://www.packtpub.com/catalogsearch/result?q=%E6%89%8B%E7%A7%83%E5%9B%BE%E7%89%87%EF%BC%8C%E6%89%8B%E7%A7%83%E4%BB%B7%E6%A0%BC%E3%80%9094003011.%E7%AD%98%E3%80%91M77https://www.packtpub.com/catalogsearch/result?q=%E5%A6%82%E4%BD%95%E4%B9%B0%E6%8A%A2+%E6%9D%BE%E9%BC%A0%E5%8D%95%E7%AE%A1%E5%9B%BE%E7%BA%B8%E3%80%9094003011.%E7%AD%98%E3%80%91oG9https://www.packtpub.com/catalogsearch/result?q=%E6%9D%BE%E9%BC%A0%E5%8D%95%E7%AE%A1%E6%8A%A2+%E3%80%9094003011.%E7%AD%98%E3%80%91Kx2https://www.packtpub.com/catalogsearch/result?q=%E6%9D%BE%E9%BC%A0%E6%9C%BA%E5%A4%B4%E5%8A%A0%E5%B7%A5%E5%9B%BE%E7%BA%B812%E5%8F%B7%E3%80%9094003011.%E7%AD%98%E3%80%91coVhttps://www.packtpub.com/catalogsearch/result?q=%E5%B0%8F%E5%8F%A3%E5%BE%84%E5%AD%90%E5%BC%B9%E4%B8%93%E5%8D%96+%E3%80%9094003011.%E7%AD%98%E3%80%91u70https://www.packtpub.com/catalogsearch/result?q=%E4%B9%B0%E8%BF%90%E5%8A%A8%E9%95%BF%E5%BC%B9+%E5%B0%8F%E5%8F%A3%E5%BE%845.6%E3%80%9094003011.%E7%AD%98%E3%80%91UDphttps://www.packtpub.com/catalogsearch/result?q=5.6%E5%B0%8F%E5%8F%A3%E5%BE%84%E5%AD%90%E5%BC%B9%EF%BC%8C%E3%80%9094003011.%E7%AD%98%E3%80%91kRjhttps://www.packtpub.com/catalogsearch/result?q=%E8%87%AA%E5%88%B6%E5%B0%8F%E5%8F%A3%E5%BE%84%E6%8B%89%E6%A0%93%E3%80%9094003011.%E7%AD%98%E3%80%91PH1https://www.packtpub.com/catalogsearch/result?q=%E5%B0%8F%E5%8F%A3%E5%BE%84%E5%93%AA%E9%87%8C%E8%83%BD%E4%B9%B0%E5%88%B0+%E3%80%9094003011.%E7%AD%98%E3%80%91Cc1https://www.packtpub.com/catalogsearch/result?q=.22%E5%8F%A3%E5%BE%84%E6%AD%A5%E6%8A%A2%E5%93%AA%E9%87%8C%E5%8F%AF%E4%BB%A5%E4%B9%B0%E5%88%B0%E3%80%9094003011.%E7%AD%98%E3%80%91urfhttps://www.packtpub.com/catalogsearch/result?q=%E9%B2%81%E6%A0%BC%E5%B0%8F%E5%8F%A3%E5%BE%84%E6%AD%A5%E6%8A%A2%E5%8E%9F%E7%90%86%E9%80%80%E5%A3%B3%E5%8E%9F%E7%90%86%E3%80%9094003011.%E7%AD%98%E3%80%91TIjhttps://www.packtpub.com/catalogsearch/result?q=%E5%81%A5%E5%8D%AB%E5%B0%8F%E5%8F%A3%E5%BE%84%E6%9C%89%E6%95%88%E5%B0%84%E7%A8%8B%E5%A4%9A%E5%B0%91%E7%B1%B3%E3%80%9094003011.%E7%AD%98%E3%80%91H77https://www.packtpub.com/catalogsearch/result?q=%E5%81%A5%E5%8D%AB%E5%B0%8F%E5%8F%A3%E5%BE%84%E6%9C%89%E5%93%AA%E4%BA%9B%E3%80%9094003011.%E7%AD%98%E3%80%91d0ohttps://www.packtpub.com/catalogsearch/result?q=22%E5%8F%A3%E5%BE%84%E8%83%BD%E6%89%93%E6%AD%BB%E9%87%8E%E7%8C%AA%E5%90%97%E3%80%9094003011.%E7%AD%98%E3%80%91Q4Ihttps://www.packtpub.com/catalogsearch/result?q=%E5%8D%95%E5%8F%91%E5%B0%8F%E5%8F%A3%E5%BE%84%E6%8A%98%E5%8F%A0%E6%8A%A2+%E8%BF%9E%E5%8F%91%E5%B0%8F%E5%8F%A3%E5%BE%84%E3%80%9094003011.%E7%AD%98%E3%80%91IINhttps://www.packtpub.com/catalogsearch/result?q=%E5%8F%91%E4%BB%A4%E5%BC%B9%E6%94%B9%E5%B0%8F%E5%8F%A3%E5%BE%84%E5%AD%90%E5%BC%B9%E3%80%9094003011.%E7%AD%98%E3%80%91j6ahttps://www.packtpub.com/catalogsearch/result?q=%E5%93%AA%E9%87%8C%E6%9C%89%E6%89%93%E9%B8%9F%E5%B7%A5%E5%85%B7%E4%BB%80%E4%B9%88%E5%9C%B0%E6%96%B9%E4%B9%B0%E3%80%9094003011.%E7%AD%98%E3%80%91q6Ehttps://www.packtpub.com/catalogsearch/result?q=%E6%89%93%E9%B8%9F%E7%9A%84%E4%B8%9C%E8%A5%BF%E5%9C%A8%E5%93%AA%E9%87%8C%E4%B9%B0%E3%80%9094003011.%E7%AD%98%E3%80%91Ogghttps://www.packtpub.com/catalogsearch/result?q=%E4%B9%B0%E4%B8%AA%E6%89%93%E9%B8%9F%E7%94%A8%E7%9A%84%E5%BC%A9%E5%A4%9A%E5%B0%91%E9%92%B1%E3%80%9094003011.%E7%AD%98%E3%80%91xiIhttps://www.packtpub.com/catalogsearch/result?q=%E6%89%93%E9%B8%9F%E7%9A%84%E5%BC%A9%E5%A4%9A%E5%B0%91%E9%92%B1%E3%80%9094003011.%E7%AD%98%E3%80%91rFyhttps://www.packtpub.com/catalogsearch/result?q=%E4%B9%B0%E6%89%93%E7%8C%8E%E6%8A%A2%E3%80%9094003011.%E7%AD%98%E3%80%91J72https://www.packtpub.com/catalogsearch/result?q=%E4%B9%B0%E6%89%93%E7%8C%8E%E6%8A%A2%E5%BC%B9%E5%BC%93%E3%80%9094003011.%E7%AD%98%E3%80%91uqqhttps://www.packtpub.com/catalogsearch/result?q=%E6%89%93%E7%8C%8E%E6%8A%A2%E5%A4%A7%E5%85%A8%E3%80%9094003011.%E7%AD%98%E3%80%91M90https://www.packtpub.com/catalogsearch/result?q=%E4%B9%B0%E4%B8%AA%E6%89%8B%E6%8B%89%E7%8E%A9%E5%85%B7%E3%80%9094003011.%E7%AD%98%E3%80%91a83https://www.packtpub.com/catalogsearch/result?q=%E5%85%A8%E9%87%91%E5%B1%9E%E6%89%8B%E6%8B%89%E9%B8%A1%E7%8E%A9%E5%85%B7%E3%80%9094003011.%E7%AD%98%E3%80%91k5Qhttps://www.packtpub.com/catalogsearch/result?q=%E6%89%8B%E6%8B%89%E7%8E%A9%E5%85%B7%E9%B8%A1%E3%80%9094003011.%E7%AD%98%E3%80%91FJ4https://www.packtpub.com/catalogsearch/result?q=%E6%89%8B%E6%8B%89%E4%B9%8B%E7%8E%8Bc10%E3%80%9094003011.%E7%AD%98%E3%80%91H0Jhttps://www.packtpub.com/catalogsearch/result?q=c10a%E5%B0%84%E7%A8%8B%E5%A4%9A%E5%B0%91%E7%B1%B3%E3%80%9094003011.%E7%AD%98%E3%80%91Mnchttps://www.packtpub.com/catalogsearch/result?q=%E6%A0%87%E5%87%86c10a%E5%92%8C%E7%89%9B%E5%A4%B4c10a%E3%80%9094003011.%E7%AD%98%E3%80%91Jw3https://www.packtpub.com/catalogsearch/result?q=%E7%89%9B%E5%A4%B4%E7%8E%A9%E5%85%B7%E4%B8%BA%E4%BB%80%E4%B9%88%E9%82%A3%E4%B9%88%E8%B4%B5%E3%80%9094003011.%E7%AD%98%E3%80%91xMjhttps://www.packtpub.com/catalogsearch/result?q=%E7%89%9B%E5%A4%B4301%E7%88%86%E7%93%B6%E6%B5%8B%E8%AF%95%E3%80%9094003011.%E7%AD%98%E3%80%91H92https://www.packtpub.com/catalogsearch/result?q=%E7%89%9B%E5%A4%B4%E7%8E%A9%E5%85%B7%E5%A8%81%E5%8A%9B%E6%8E%92%E5%90%8D%E3%80%9094003011.%E7%AD%98%E3%80%91oighttps://www.packtpub.com/catalogsearch/result?q=%E7%89%9B%E5%A4%B4%E7%8E%A9%E5%85%B7%E6%8A%A2702%E3%80%9094003011.%E7%AD%98%E3%80%91EHHhttps://www.packtpub.com/catalogsearch/result?q=%E6%9A%B4%E5%8A%9B%E5%BC%B9%E7%B0%A71911%E5%B0%84%E7%A8%8B%E3%80%9094003011.%E7%AD%98%E3%80%91ZH6https://www.packtpub.com/catalogsearch/result?q=%E7%89%9B%E5%A4%B4%E6%89%8B%E6%8B%89%E7%8E%A9%E5%85%B7%E7%BD%91%E5%9D%80%E3%80%9094003011.%E7%AD%98%E3%80%91tO6https://www.packtpub.com/catalogsearch/result?q=%E7%89%9B%E5%A4%B4301%E5%8F%AF%E4%BB%A5%E6%89%93%E9%92%A2%E7%8F%A0%E5%90%97%E3%80%9094003011.%E7%AD%98%E3%80%91Tpjhttps://www.packtpub.com/catalogsearch/result?q=%E6%89%8B%E6%8B%89%E9%B8%A1%E4%B8%93%E5%8D%96%E5%BE%AE%E4%BF%A1%E3%80%9094003011.%E7%AD%98%E3%80%91dbehttps://www.packtpub.com/catalogsearch/result?q=%E6%B7%98%E5%AE%9D%E6%89%8B%E6%8B%89%E9%B8%A1%E3%80%9094003011.%E7%AD%98%E3%80%91xFVhttps://www.packtpub.com/catalogsearch/result?q=%E9%92%A2%E7%8F%A0%E9%B8%9F%E6%8A%A2+%E5%85%85%E6%B0%94%E9%92%A2%E7%8F%A0%E9%B8%9F%E6%8A%A2%E3%80%9094003011.%E7%AD%98%E3%80%91xnNhttps://www.packtpub.com/catalogsearch/result?q=%E5%85%85%E6%B0%94%E6%89%93%E9%92%A2%E7%8F%A0%E7%9A%84%E5%8F%91%E5%B0%84%E5%99%A8%E3%80%9094003011.%E7%AD%98%E3%80%91Ebqhttps://www.packtpub.com/catalogsearch/result?q=%E9%92%A2%E7%AE%A1%E4%B8%93%E5%8D%96%E5%81%9A%E9%92%A2%E7%8F%A0%E5%8F%91%E5%B0%84%E5%99%A8%E3%80%9094003011.%E7%AD%98%E3%80%91SyPhttps://www.packtpub.com/catalogsearch/result?q=8mm%E9%92%A2%E7%8F%A0%E8%83%BD%E4%B8%8B%E9%87%8E%E9%B8%A1%E5%90%97%E3%80%9094003011.%E7%AD%98%E3%80%91MQs

小草1434

首先在用户的实体类中,保留一个字段区别身份【比如role字段】,在登录的判断方法中,根据用户的这个role字段分别作出跳转不同页面【最土的办法就是每个角色一个页面】。如果设计较为友好的话,就是把不同角色所能够操作的选项当成是不同的权限【permission】,然后用这个role字段分别关联用户与permission(常说的数据表多对多的关系),在前端显示上就是根据不同的role值查找到不同的permission数组渲染到页面上(一般就是一个列表,逐一显示在菜单栏中)

Developer_Zuck

对这个问题有我两种解决方案:1.利用拦截器Filter;2可以用shiro进行权限控制,绝对可以实现这些功能

amorlova

登陆的时候根据你的标识判断
打开App,查看更多内容
随时随地看视频慕课网APP
我要回答
继续浏览精彩内容
慕课网APP
程序员的梦工厂
继续