IDEA整合jeesite4.x


Jeesite4.x安裝教程(自學記錄)

其中配置maven、jdk、mysql的操作都沒有做備注

1、官方文檔鏈接

https://jeesite.gitee.io/docs/install-deploy/

 

2、下載代碼到本地

git clone https://gitee.com/thinkgem/jeesite4.git

3、idea導入jeesite4工程

 

 

 

4、配置maven,以及下載相關依賴jar包(第一次時間比較長,耐心等待) 

5、配置jdk (官方推薦jdk1.8版本)

6、配置數據庫

(1)初始化數據庫(參考官網)

1)打開 my.ini [mysqld] 增加如下配置: sql_mode="ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" 2)如果遇到 ERROR 1709 (HY000): Index column size too large. The maximum column size is 767 bytes. 錯誤 a)

打開 my.ini [mysqld] 增加如下配置: innodb_large_prefix = ON innodb_file_format = Barracuda innodb_file_per_table = ON b)

並修改報錯的建表語句后面加上:ENGINE=InnoDB row_format=DYNAMIC; #

若沒有修改my.ini的權限也可以使用命令查看參數和設置參數:

show global variables like "innodb_large_prefix";

show global variables like "innodb_file_format"; show global variables like "innodb_file_per_table";

set global innodb_large_prefix=ON; set global innodb_file_format=Barracuda; set global innodb_file_per_table=ON;

 2) 創建用戶和授權 (在數據庫中運行)

set global read_only=0; set global optimizer_switch='derived_merge=off'; create user 'jeesite'@'%' identified by 'jeesite'; create database jeesite DEFAULT CHARSET 'utf8' COLLATE 'utf8_unicode_ci'; grant all privileges on jeesite.* to 'jeesite'@'%' identified by 'jeesite'; flush privileges;
3)配置數據庫鏈接

改成自己的數據庫名稱、用戶名、密碼即可

若剛才導入到的 Eclipse(IDEA) 的項目已經完成加載 jar 並無錯誤,這時你就可以執行/bin/init-data.bat(.sh)腳本初始化數據庫了,第一次執行如果遇見table xxx doesn't exist的錯誤信息,忽略即可。 

如果/bin/init-data.bat(.sh)無法運行,你可以在 idea里找到com.jeesite.test.InitData.java文件,點擊 Run As -> JUnit Test 運行單元測試,進行初始化數據庫腳本。注意:必須帶上參數 -Djeesite.initdata=true 來運行這個方法

 

8、啟動項目

可以配置自己的訪問路徑和端口號

找到web工程下 com.jeesite.modules.Application,直接運行該方法:

 

 

 

 

 

點擊run "Application"

 

 

 

 

代表啟動成功  默認 端口號 8980 訪問路徑 127.0.0.1:8980/js/

 

輸入用戶名 密碼   默認權限最高管理員  system  密碼admin    

大功告成!!!!

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM