Java开源框架 iBase4J 搭建笔记
項目地址:https://gitee.com/iBase4J/iBase4J
搭建步驟:
? ? 1、git 代碼
? ??2、安裝 Zookeeper
? ??3、打包部署?Dubbo Admin
? ??4、安裝 Nginx?
? ??5、配置文件
? ??6、啟動Web Server 和 Service Server
? ??7、搭建完成
詳細步驟:
? ??1、git代碼
? ??本人用的 idea -> File -> New -> Project From Version Control -> Git
? ??輸入 iBase4J 地址:?https://gitee.com/iBase4J/iBase4J.git
? ??選擇本地保存地址輸入名稱,點擊 Clone,稍等一會,代碼下載完畢,如下圖:
2、安裝?Zookeeper
? ? ? 安裝方法:http://blog.csdn.net/antma/article/details/79219493
? ??
3、打包部署?Dubbo Admin
? ? ??本人是直接把源碼下載下來,自己打包
? ? ??部署方法見:?http://blog.csdn.net/antma/article/details/79219739
4、安裝 Nginx?
? ? 下載地址:http://nginx.org/en/download.html
? ? 下載解壓后,修改 conf/nginx.conf 文件為:
worker_processes 1;events {worker_connections 1024; }http {include mime.types;default_type application/octet-stream;sendfile on;keepalive_timeout 65;server {listen 80;server_name localhost;# 靜態頁面目錄root E:\MyCode\iBase4J\iBase4J-UI\iBase4J-UI-AngularJS;# 默認首頁index index.html;location / {# 用戶瀏覽器端的緩存設置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;}}# 動態頁面,交給tomcat處理if ( !-e $request_filename) {proxy_pass http://127.0.0.1:8088;}}error_page 500 502 503 504 /50x.html;location = /50x.html {root html;}}} 其中: # 靜態頁面目錄root E:\MyCode\iBase4J\iBase4J-UI\iBase4J-UI-AngularJS; 上面這塊需要修改為 iBase4J 的UI相應目錄。 # 動態頁面,交給tomcat處理if ( !-e $request_filename) {proxy_pass http://127.0.0.1:8088;} 上面這個為后端地址。Nginx配置完畢!
命令行運行 Nginx -t ?檢查配置文件語法是否正確,然后運行 start nginx 啟動Nginx,如下圖:
經過以上配置,直接訪問 http://localhost 即可打開前端頁面:
待續....
總結
以上是生活随笔為你收集整理的Java开源框架 iBase4J 搭建笔记的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: String in Java
- 下一篇: excel拼接数据宏