Clone the repository: Use Git to clone the repository or download the repository zip package directly to your computer to obtain the source code.
Open the project: Use the IntelliJ IDEA development tool to open the course-server back-end service system module, and then use the Maven project build tool to update the project module dependencies.
Create a database and import data: Log in to the MySQL console, create seven databases based on the seven SQL script files in the document/sql directory, and import the database tables and data.
Modify configuration:
Optional configuration:
course-server/service/service-live/**/application.properties: Modify the configuration information of Huantuo Cloud Live Broadcast Platform. If not modified, the CRUD function related to the live courses in the background management system (course-backend) will be abnormal.
course-server/service/service-user/**/application.properties: Modify the application ID information and application key of the WeChat public account test account and the callback address after the user agrees to authorize personal information.
Note that this callback address must be a public address to be recognized by the WeChat platform, and the domain name of the web account authorization callback page needs to be configured in the WeChat public account test account. See 1.4 for details. If it is not modified, the relevant functions in the WeChat official account on the mobile phone will not be available.
course-server/service/service-vod/**/application.properties: Modify the storage space information of Tencent Cloud Object Storage and the application ID information of Tencent Cloud Video on Demand Service. If it is not modified, Tencent Cloud related image storage services will be unavailable, and course section videos cannot be uploaded and viewed.
course-server/service/service-wechat/**/application.properties: Modify the configuration information and interface configuration information of the WeChat public account test account, and you need to fill in the interface configuration information in the WeChat public account test account. See 1.4 for details. If it is not modified, all functions of the WeChat official account on the mobile phone will be abnormal. At the same time, you also need to modify the server address of the WeChat official account page, which is the deployment address of the course-mobile project. This address needs to be a public network address for WeChat backend call. If it is not modified, the function of viewing course information in the WeChat official account will be abnormal. Cannot jump to any page.
Note: The public domain name addresses used in service-user and service-wechat can be implemented by configuring intranet penetration. For details, please refer to the Ngrok intranet forwarding tool. Specifically, two intranet penetration addresses need to be configured:
Project name | submodule | port | Intranet penetration address |
---|---|---|---|
course-server (backend service system) | |||
gateway | 8888 | http://course.5gzvip.91tunnel.com | |
service-vod | 8081 | ||
service-order | 8082 | ||
service-activity | 8083 | ||
service-user | 8084 | ||
service-wechat | 8085 | ||
service-live | 8086 | ||
course-mobile (mobile application system) | 8080 | http://mobile.vipgz4.91tunnel.com | |
course-backend (backend management system) | 9528 |
Start the Nacos service: Enter the bin directory under the Nacos installation directory, and run the startup.cmd -m standalone command on the console to start the Nacos service in stand-alone mode.
Start the back-end service system: Start all back-end services in batches in IDEA, including one gateway (gateway) and six business services (service-*).
Note: Please ensure that one gateway and six business services in 1.1 Backend Service System are started normally to provide normal interface functions.
Note: Please ensure that one gateway and six business services in 1.1 Backend Service System are started normally to provide normal interface functions.
Apply for a WeChat public account test account and configure the web account authorization callback page domain name in the WeChat public account test account.
To configure the interface configuration information of the public account test account, you only need to modify the public domain name part, that is, modify course.5gzvip.91tunnel.com as your own public domain name.
Synchronize the official account menu information in the background management system.
Follow the official account and test the related functions of the official account on the mobile phone.
The system's entire network penetration configuration and request response process are as follows:
Silicon Valley Classroom is a project jointly launched by Shang Silicon Valley and Tencent Cloud. It is an online learning platform based on the B2C model of WeChat public accounts. The platform includes three major modules: live broadcast, teaching and WeChat messaging service.
The platform will regularly launch live courses to facilitate communication and interaction between students and famous teachers. Students can also purchase teaching videos to learn online, and share live broadcasts and teaching videos to gain platform revenue. The platform supports a series of functions such as live broadcast, Tencent Cloud video on demand, WeChat payment, WeChat authorized login, WeChat menu, WeChat messaging and Tencent Cloud file storage, building a comprehensive online learning platform for students.
Silicon Valley classroom projects are highly practical, the business scenarios are close to reality, the technology applications follow market trends, and they are developed completely in accordance with market needs. It not only systematically sorts out and integrates mainstream Java technologies, but also serves as a training ground for the practical application of various mainstream technologies, which can help Java programmers accumulate project experience.
course - backend -- 父工程,统一依赖管理
├── client -- 客户端,通过 Spring Cloud Feign 提供服务
├── activity -- 营销活动相关服务
├── order -- 订单 api 接口
├── user -- 用户 api 接口
├── vod -- 课程点播 api 接口
├── common -- 通用模块
├── model -- 通用数据模型
├── util -- 通用工具类
├── gateway -- 服务网关,统一管理各种 service 服务,解决跨域问题
├── service -- 提供服务,为前后台提供具体服务
├── live -- 营销活动相关服务
├── model -- 直播课程相关服务
├── order -- 订单相关服务
├── user -- 用户相关服务
├── vod -- 课程点播相关服务
├── wechat -- 微信公众号相关服务
technology | illustrate |
---|---|
Spring Boot | Spring rapid development scaffolding |
Spring Cloud Gateway | Spring gateway |
Spring Cloud Alibaba Nacos | Microservice registration center |
Spring Cloud Feign | remote service call |
MyBatis Plus | ORM framework |
MySQL | relational database |
Easy Excel | Java excel operation tool |
Swagger | Project document generation tool |
JWT | Cross-domain authentication solution |
Lombok | Simplify POJO class development |
Vue.js | JavaScript framework |
Axios | request library |
ElementUI | Desktop component library |
Vant | Mobile component library |
Tencent Cloud Object Storage | object storage |
Tencent Cloud Video on Demand | video on demand |
Huantuo Cloud Live Broadcast | Live video |
WeChat public account | Official account |
Administrator login page
Administrator welcome page
Add a new lecturer: Fill in the necessary information for the lecturer and upload the lecturer's avatar to the Tencent Cloud Object Storage Platform for image storage.
Delete instructor
Edit lecturer: Select the lecturer to be edited, echo the lecturer information, and update the lecturer information after saving.
Query the lecturer: You can query the displayed lecturer based on the lecturer's name, title and other information.
Import course classification: Select the excel file with course classification saved, upload it to the server, and the server will parse and save the course classification information.
Export course classification: Select the Export course classification button, and the server will process the course classification information and write it into an excel file for download.
Query course classification: "Lazy loading" display of course classification information.
Add a new course: fill in the necessary information for the course, select the course classification information, and upload the course cover.
Delete course
Edit course
Query courses: You can query courses based on course classification information, course name, and course instructor information.
Course visitor statistics
Edit course syllabus: There are multiple chapters under a course, one chapter contains multiple sections, and one course section corresponds to one course video.
Add new course chapter
Upload a course section video: Select a course section video and upload it to the Tencent Cloud video on demand platform.
Publish course: Modify the course to published status.
Add coupon
Delete coupon
Edit Coupon
Coupon details: Display coupons and used coupon information.
Add official account menu
Modify the official account menu
Synchronize the official account menu: After synchronizing the official account menu, the latest menu information will be synchronized to the WeChat official account.
Official account menu list
Order query: Query the user's course order information based on order number, mobile phone number and other information.
Add live broadcast
Delete live broadcast
Edit live broadcast
Live broadcast configuration
Live broadcast account
Follow the public account
About me submenu
Keyword query course
Course Category Submenu
Course classification list
Course details
Course video playback
Buy a course
Redeem coupon
Coupon not available
Available coupons
Simulate order payment
Course purchased successfully
Payment message push
MIT License
Copyright (c) 2023 Spring-_-Bear
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.