In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "java background management system how to achieve login registration and authority module". In daily operation, I believe that many people have doubts about how to achieve login registration and authority module in java background management system. I have consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts of "java background management system how to achieve login registration and authority module". Next, please follow the editor to study!
Log in and register, first copy the page corresponding js,css,imag, etc., and then mainly obtain the data from the page through the form form, receive the data in the background and save it to the database
To import jar packages first, in addition to basic spring packages, you also need to import packages related to shiiro permissions:
Introducing shiro into applicationContext.xml
Configure shiroFilter in web.xml:
In the first four steps, the environment for shiro has been configured, and now we begin to write the utility class MD5 encryption class to dynamically obtain the class of the currently logged-in user with UserContext
MD5 utility class
UserContext utility class:
Write unauthourized. Jsp authorization page, write main page main.jsp: introduce
Dynamic access to registrants
Welcome
Write off
Write off
Use mybatis-generator to generate domain,mapper and velocity from tables to generate query,service,Controller,jsp,js
The jar required to write mybatis-generator
Paging plug-in
Velocity plug-in
Create filterChainDefinitionMapFactory to dynamically store permissions in the permission permission table, create itsourcePermissionAuthourization, and create itsourceRealm for authorization and authentication
Create FilterChainDefinitionMapFactory
Create an itsourcePermissionAuthourization to determine whether you have the appropriate permissions
Create itsourceRealm for authorization and authentication
Encrypt the password when you register, and put the password of the page into UserConterx when you log in.
Log in
After logging in at this time, you already have the corresponding user's rights, and then add, delete, change and check the permissions role, and prepare the page of the front desk role.
b. Delete, you can delete one or more
C. Modify, note that 5 tables are associated with employee,role,permission (and two intermediate tables); when modifying role permissions, be sure to add employees who exist in the employee table, which is also in line with the series.
D. add, when adding role permissions, be sure to add employees who exist in the employee table, which is also logical.
twelve。 Give each add, delete, change and query dynamic get button
Introduce
Dynamic button
Besides, the design of roleMapper.xml
At this point, on the "java background management system how to achieve login registration and permissions module" on the end of the study, I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.