smart-admin 快速启动
快速啟動(dòng)
Quick Start
快速啟動(dòng)
如果你是全棧開發(fā)者,你完全可以快速過一遍此文章,甚至也可以不用看,如果你是前端OR后端,請(qǐng)仔細(xì)閱讀。
1 拉取代碼
從 https://github.com/1024-lab/smart-admin 或者 https://gitee.com/lab1024/smart-admin 拉取最新代碼
2 啟動(dòng)后端
2.1 執(zhí)行Sql腳本(Mysql5.7+)
Sql腳本:/smart-admin/java/smart-admin-api/src/main/resources/sql
先執(zhí)行 smart-admin.sql
再執(zhí)行 quartz_mysql_2.3.0.sql
2.2 啟動(dòng)Redis
如果有redis環(huán)境,可以直接忽略,如果沒有,請(qǐng)安裝:
Linux版本:https://redis.io/download
Windows版本:https://github.com/microsoftarchive/redis/releases
2.3 將后端項(xiàng)目導(dǎo)入idea或者eclipse (java8+)
先將/java/smart-admin-parent 項(xiàng)目導(dǎo)入到idea或者eclipse中(以maven項(xiàng)目導(dǎo)入!)
再將/java/smart-admin-api 項(xiàng)目導(dǎo)入到idea或者eclipse中(以maven項(xiàng)目導(dǎo)入!)
2.4 修改配置文件
進(jìn)入 smart-admin-api 項(xiàng)目,打開src/main/resources/dev/application.properties文件
(1)修改jdbc參數(shù),改為你的mysql地址和賬號(hào)
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/smart-admin-dev?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC
spring.datasource.username=erp
spring.datasource.password=listen1015
(2)修改redis參數(shù)
spring.redis.database=13
spring.redis.host=172.16.0.145
spring.redis.jedis.pool.max-active=100
spring.redis.jedis.pool.min-idle=5
spring.redis.jedis.pool.max-idle=10
spring.redis.jedis.pool.max-wait=30000ms
spring.redis.port=50000
spring.redis.timeout=10000ms
spring.redis.password=
數(shù)據(jù)庫(kù)需要修改對(duì)應(yīng)的庫(kù)名,ip,port,username,password
redis需要ip,port和密碼(如果設(shè)置了密碼)
2.5 啟動(dòng),發(fā)射
啟動(dòng)前:檢查redis和mysql沒問題,sql腳本執(zhí)行成功,jdbc和redis配置參數(shù)正確
找到SmartAdminApplication啟動(dòng)類,運(yùn)行。
訪問:http://localhost:10086/smart-admin-api/swagger-ui.html 能看到swagger文檔
到此,后端啟動(dòng)成功!
3 啟動(dòng)前端
啟動(dòng)前,確保nodejs版本和npm版本支持 vue2.x,
下載安裝node.js,下載地址:https://nodejs.org/en/
建議版本使用 12.13.1LTS
3.1 安裝依賴
命令行 進(jìn)入/smart-admin/front,執(zhí)行npm install命令,安裝依賴
3.2 啟動(dòng)local環(huán)境
安裝依賴后,在/smart-admin/front目錄,命令行執(zhí)行 npm run local
3.3 訪問
訪問 http://localhost:8080 , 賬號(hào):sa/123456
總結(jié)
以上是生活随笔為你收集整理的smart-admin 快速启动的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 科目三考试要点
- 下一篇: SmartFoxServer简介