First, Introduction
IBASE4J is a distributed system architecture, each module is a separate system, each system can publish multiple service, different web use the same Redis cache to ensure the same session, the Code cloud address is: Https://gitee.com/iBase4J/iBase4J
There are 8 sub-projects under the current project: Ibase4j-common, Ibase4j-sys-facade, Ibase4j-sys-service, Ibase4j-sys-web, Ibase4j-biz-facade, Ibase4j-biz-service, Ibase4j-biz-web, Ibase4j-ui
1, Ibase4j-common is a common configuration and tool class, has been hit into a jar package;
2. Ibase4j-sys-facade is the Ibase4j-sys-service and ibase4j-sys-web interaction needs façade and Model;ibase4j-sys-service is the system management related database operation service;
3, Ibase4j-sys-web is a bridge connecting UI and Ibase4j-sys-service.
4, Ibase4j-sys-web, and ibase4j-sys-service interact through Dubbo or MQ. Web and service can create multiple, Web uses the same Spring-session namespace and register to the same Redis service to implement session sharing, The web invokes a different service method by invoking a unified Provider.excute method with different parameters.
5, UI is separated from front and back, need to use Nginx reverse proxy. Get data through Ajax asynchronous request;
multiple systems are distributed to different web by different prefixes;
6, Ibase4j-sys-service use Druid Connection database, can monitor SQL execution, Access address: Service address: Service port/druid;
Use AOP for read-write database switching, using the MyBatis persistence Framework, using pagehelper secondary paging, and using spring annotations to cache data to Redis ; Ibase4j-sys-web uses the Spring MVC framework to manage the controller; With Shiro secondary administrative permissions, permissions are tightly controlled to a URL request.
Dispatch Management, where only scheduled declarations can be deleted, modified, paused, started, executed. The implementation of the scheduling can be in any other module, just expose the service with Dubbo. scheduling supports cluster mode.
7, the UI is currently scheduled to have 3 versions, developed only ANGULARJS version
different UI menu is different, so please execute the corresponding SQL menu as needed;
8, Ibase4j-biz-facade, Ibase4j-biz-service , Ibase4j-biz-web to expand the business function project.
9, SQL file see the project Sqls directory;
10. Permission control:
1) Menu Permissions: You can configure the user menu directly, or you can configure the role to use the User menu, sys_user_role Configure the user role, Sys_role_menu Configure the Role menu/permissions, the Action class permission (add and revise, etc.) configured to not display the menu;
2) control of permissions in the code, as shown in figure
Second, the environment construction
2.1. Basic Tools
There is a key to start the script, the download address is: http://download.csdn.net/download/u011781521/10198544
After extracting the following
Modify the Nginx configuration file nginx.conf
The contents are as follows:
[HTML] View plain copy #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main ' $remote _addr - $remote _ user [$time _local] "$request" " # ' $status $body _bytes_sent "$ Http_referer " " # ' "$http _user_agent" "$http _x_forwarded_for"; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; # static page directory root d:\fendo_project _work\ibase4j\ibase4j-ui\ibase4j-ui-angularjs; # Default Home index index.html; location / { # User browser-side cache settings &Nbsp; location ~* \. (Css|js|jpg|jpeg|gif|png|swf|htm|html|json|xml|svg|woff|ttf|eot|map|ico) $ { expires 1h; if (-f $request _filename) { break; } } # Dynamic page, hand over to Tomcat processing if ( !- e $request _filename) { proxy_pass http://127.0.0.1:8088; }