美文网首页开源工具技巧Java 杂谈分布式架构
领课教育—在线教育系统(部署文档)

领课教育—在线教育系统(部署文档)

作者: 金桔文案 | 来源:发表于2019-03-11 12:11 被阅读13次

1、项目源码导入

源码地址:https://gitee.com/roncoocom/roncoo-education

觉得我们项目还不错的朋友记得给个Star哦!

2、常见问题解决方法

(1)pom.xml文件报错,如图。

image

解答:这个是因为jdk和maven导致的,需要把Eclipse改为使用本地JDK(默认为JRE),maven最低版本要求3.0 +

(2)很多get、set方法报错,如图。

image

解答:由于本项目使用了Lombok来优化代码,消除冗长代码,所以如果 Eclipse没配置有lombook这个jar会 报错,需要配置lombook。在Eclipse根目录加入lombook,eclipse.ini文件加入-javaagent:lombok.jar,重启eclipse即可。

3、项目配置中心导入

配置中心地址:https://gitee.com/roncoocom/roncoo-education-config

4、数据库脚本导入

数据库脚本请加QQ群:826617734

5、项目运行

(1)模块介绍:

注册中心(roncoo-education-server-eureka)
配置中心(roncoo-education-server-config)
课程模块(roncoo-education-course)
用户模块(roncoo-education-user)
系统模块(roncoo-education-system)
后台模块(roncoo-education-com-web-boss)
定时器(roncoo-education-crontab-plan)
网关工程(roncoo-education-gateway-api)
链路监控(roncoo-education-server-zipkin)
应用监控(roncoo-education-server-admin)

(2)修改注册中心(application-dev.properties):

info.eureka.host=localhost
image

(3)修改配置工程(application-dev.properties):

spring.profiles.active=localspring.cloud.config.server.git.uri=存放配置中心的git地址
spring.cloud.config.server.git.username=git账号
spring.cloud.config.server.git.password= git密码
image

(4)修改课程、用户、系统、后台模块、应用监控,定时器,网关(bootstrap.properties):

info.eureka.host01=localhost
info.eureka.host02=localhost
spring.profiles.active=local
image

(5)修改配置中心(application-local.properties):

spring.data.elasticsearch.cluster-nodes= 节点
spring.data.elasticsearch.cluster-name=集群名称
spring.redis.host=redis地址
spring.redis.port=redis端口
spring.redis.password=redis密码
image

(6)修改配置中心模块工程数据库连接(roncoo-education-course-service-local.properties)、(roncoo-education-user-service-local.properties)和(roncoo-education-web-boss-local.properties):

spring.datasource.druid.url=本地数据库连接
spring.datasource.druid.username=mysql账号
spring.datasource.druid.password=mysql密码
mysql密码使用durid加密:
java -cp druid-1.0.16.jar com.alibaba.druid.filter.config.ConfigTools 你的密码
image

(7)启动顺序:注册中心 → 配置中心→ 模块工程 → 定时器 → 网关工程 → 应用监控、链路监控(可以不启动)

注册中心地址:http://localhost:5761
管理后台地址:http://localhost:5880
网关服务地址:http://localhost:5840

5、前端导入运行

前端源码地址:https://gitee.com/roncoocom/roncoo-education-web
api——主要存放了各个工程的接口
config——主要配置网关地址,经过网关请求后台接口
pages——主要是存放页面
修改config里conf.js的开发环境网关地址: 本地ip+网关端口/#/
image
前端运行需要用到node
编译使用:
npm install
npm run dev
前端访问地址:http://127.0.0.1:3000/
image

相关文章

网友评论

    本文标题:领课教育—在线教育系统(部署文档)

    本文链接:https://www.haomeiwen.com/subject/rxbvpqtx.html