Jfinaluib is jfinal + charisma + beetl + PostgreSQL (while supporting MySQL) + Ehcache + ztree + Druid + Bcprov Implementation of user Rights management system;
The project uses a number of open source components, and some are shared learning code Snippets , first thanks to them!!!
Project background:
May 14 Learning Jfinal, developed for practicing purposes.
Beneficiary Groups:
For beginners jfinal and Beetl's peers are a very comprehensive demo project
For beginners of the design of the rights is also considered the most concise permissions to achieve
You can also do the project based on it, it just does some basic functions that most of the projects should do
What you can learn:
A more comprehensive control and implementation based on URL rights
How to integrate Jfinal + beetl, beetl use, register function and call, and then to BEETL extended compute view time consuming
How to implement the query of paging and dynamic condition
Handler and Interceptor use of jfinal, handling of global exceptions and error mechanisms
Charisma UI usage and expansion, after transformation, supports AJAX interaction based on Jqueryform, use of pop-up boxes, form data checksum
Ztree Detailed use of the method, there is a simple tree display, the use of more than one choice, the default selection effect of the implementation of complex tree operations there are also department + Personnel combination, module + functional combination
Password encryption and storage based on Bcprov
Use and configuration of Druid
zxing Processing barcode identification and generation, including the logo of the two-dimensional code
Code Interpretation:
Jfinaluib Code notes (1)---jfinal optimistic lock http://my.oschina.net/dongcb678/blog/278436
Jfinaluib Code notes (2)---jfinal view time-consuming calculation http://my.oschina.net/dongcb678/blog/278450
Jfinaluib Code notes (3)---jfinal Controller global parameter Encapsulation http://my.oschina.net/dongcb678/blog/278695 Function Introduction:
1. The system has implemented the rights management based on the URL, the page operation controls to the button level, according to the permission configuration carries on the display, and in the interceptor again authentication, only then assigns the permission to carry on the operation
2. All URL accesses are logged in detail, including action-time, view-time, total time consuming, whether the access succeeds or fails, or has permissions, which are detailed in the log table
3. Charisma UI has been expanded two times to achieve form data validation, single page Ajax request (based on Jqueryform, its own limited support)
Code Address:
Http://git.oschina.net/dongcb678/JfinalUIB.git
Https://code.jd.com/dongcb678/JfinalUIB.git
Installation configuration:
1. Direct Decompression import Eclipse
2. Import Database files
2.1 PostgreSQL
/doc/database/postgresql/jfinaluib.backup, pgadmin III new Library Right key restore backup file;
Public.sql file is a navicat premium export of a complete file, can also use navicat premium recovery;
2.2 MySQL
/doc/database/mysql/jfinaluib.sql, is a navicat premium exported a complete file, can also use Navicat Premium recovery
3. Modify/web-inf/init.properties to modify the corresponding database connection information according to the Db.type value
4. Start Project
5. Access to the portal Http://127.0.0.1:89/jf/login
User name: Admins
Password: 0000006 zeros
6. Code Description:
A. Permission design process: two lines
One is User – "Grouping –" Role – "function"
Second, user – "Post –" function
B. In the beetl aspect, the Beetlrender and beetlrenderfactory are mainly rewritten to realize the time consuming calculation function of the view,
Total time elapsed minus view time by handle to get action time consuming
C. All the underlying data are cached in Ehcache, such as user, group, role, function, post, etc.
Mainly in the Paraminit class, the project launches for caching, and other actions that involve caching data synchronize the update cache