今天給大家開源一個基於springboot的線上教育平臺系統,系統是小孟開發的,第一個版本是小鋒開發的(小鋒的部落格),我進行了本版本的開發。
該系統完全免費、開源。
系統完美執行,無任何的bug,技術較多,可以當做面試的專案或者作為畢設的專案。
系統獲取原始碼的方式見文章底部。
為防止刷著刷者找不到,大家點贊、收藏文章。
系統完美執行。具體的介紹如下所示。
目錄
核心技術:SpringBoot+mybatis;
前端:layui;
開發工具:idea;
資料庫:mysql5.7;
模版引擎:thymeleaf;
安全框架:SpringSecurity;
紀錄檔框架:logback;
資料庫連線池:druid;
線上編輯器:ckeditor;
圖片輪播元件:jQuerySwipeslider;
本專案分前臺使用者介面功能和後臺管理功能;
前臺使用者介面功能:
捲動大條幅展示重要通知和課程或者活動;
展示課程,根據實際業務需求,展示課程推薦,最新課程,免費課程,實戰課程;
課程搜尋,使用者輸入指定課程關鍵字,可以搜尋查詢,也可以根據課程類別分類,和型別進行搜尋;
課程詳細展示
使用者登陸
線上支付
後臺管理功能:
管理員登入
課程管理
課程類別管理
使用者管理
授課老師管理
訂單管理
選單管理
友情連結管理
系統屬性管理
自定義貼文管理
輪轉圖片貼文管理
提供按照課程的類別,型別以及搜尋方塊進行快速查詢相關課程
點選任意一門課程,免費課程可以直接觀看,vip課程則需要通過支付寶或者微信繳費開通vip進行觀看
學習課程時候需要登入才能觀看相關視訊資料
登入後可以檢視個人中心的相關功能
在我的訂單介面可以檢視已經購買的課程
在課程釋出頁面可以提交發布的課程資料
在我的釋出頁面可以檢視所有已經發布的課程相關資訊,檢視稽核狀態
包括使用者管理,角色管理,選單管理,可以檢視對應的資訊並新增,匯入,修改或刪除
角色管理介面可以為角色分配許可權
可以新增課程,對課程進行分類管理:公共課程,專業課程,免費課程等
在類別管理中可以新增課程的分類資訊
在稽核功能處可以對上傳的視訊進行稽核
/**
* 操作紀錄檔記錄註解
* Created by xiaomeng 2020-03-21 17:03
*技術交流v:kaifazixun
* 操作紀錄檔記錄註解
* Created by wangfan on 2020-03-21 17:03
*/
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface OperLog {
/**
* 模組
*/
String value();
/**
* 功能
*/
String desc();
/**
* 是否記錄請求引數
*/
boolean param() default true;
/**
* 是否記錄返回結果
*/
boolean result() default false;
}*
*/
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface OperLog {
/**
* 模組
*/
String value();
/**
* 功能
*/
String desc();
/**
* 是否記錄請求引數
*/
boolean param() default true;
/**
* 是否記錄返回結果
*/
boolean result() default false;
}
@Aspect
@Component
public class OperLogAspect {
private ThreadLocal<Long> startTime = new ThreadLocal<>();
@Autowired
private OperRecordService operRecordService;
@Pointcut("@annotation(com.egao.common.core.annotation.OperLog)")
public void operLog() {
}
@Before("operLog()")
public void doBefore(JoinPoint joinPoint) throws Throwable {
startTime.set(System.currentTimeMillis());
}
@AfterReturning(pointcut = "operLog()", returning = "result")
public void doAfterReturning(JoinPoint joinPoint, Object result) {
saveLog(joinPoint, result, null);
}
@AfterThrowing(value = "operLog()", throwing = "e")
public void doAfterThrowing(JoinPoint joinPoint, Exception e) {
saveLog(joinPoint, null, e);
}
private void saveLog(JoinPoint joinPoint, Object result, Exception e) {
// 獲取reques物件
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = (attributes == null ? null : attributes.getRequest());
// 構建操作紀錄檔
OperRecord operRecord = new OperRecord();
operRecord.setUserId(getLoginUserId());
if (startTime.get() != null) operRecord.setSpendTime(System.currentTimeMillis() - startTime.get());
if (request != null) {
operRecord.setRequestMethod(request.getMethod());
operRecord.setUrl(request.getRequestURI());
operRecord.setIp(UserAgentGetter.getIp(request));
}
// 記錄異常資訊
if (e != null) {
operRecord.setState(1);
operRecord.setComments(StrUtil.sub(e.toString(), 0, 2000));
}
public class BaseController {
/**
* 獲取當前登入的user
*/
public User getLoginUser() {
Subject subject = SecurityUtils.getSubject();
if (subject == null) return null;
Object object = subject.getPrincipal();
if (object != null) return (User) object;
return null;
}
/**
* 獲取當前登入的userId
*/
public Integer getLoginUserId() {
User loginUser = getLoginUser();
return loginUser == null ? null : loginUser.getUserId();
}
}
/**
* 使用者管理
* Created by xiaomeng 2020-12-24 16:10
*技術交流V:kaifazixun
*/
@Controller
@RequestMapping("/sys/user")
public class UserController extends BaseController {
@Autowired
private UserService userService;
@Autowired
private DictionaryDataService dictionaryDataService;
@Autowired
private RoleService roleService;
@Autowired
private OrganizationService organizationService;
@RequiresPermissions("sys:user:view")
@RequestMapping()
public String view(Model model) {
model.addAttribute("sexList", dictionaryDataService.listByDictCode("sex"));
model.addAttribute("organizationTypeList", dictionaryDataService.listByDictCode("organization_type"));
model.addAttribute("rolesJson", JSON.toJSONString(roleService.list()));
return "system/user.html";
}
/**
* 個人中心
*/
@RequestMapping("/info")
public String userInfo(Model model) {
model.addAttribute("user", userService.getFullById(getLoginUserId()));
model.addAttribute("sexList", dictionaryDataService.listByDictCode("sex"));
return "index/user-info.html";
}
/**
* 分頁查詢使用者
*/
@OperLog(value = "使用者管理", desc = "分頁查詢")
@RequiresPermissions("sys:user:list")
@ResponseBody
@RequestMapping("/page")
public PageResult<User> page(HttpServletRequest request) {
PageParam<User> pageParam = new PageParam<>(request);
pageParam.setDefaultOrder(null, new String[]{"create_time"});
return userService.listPage(pageParam);
}
/**
* 查詢全部使用者
*/
@OperLog(value = "使用者管理", desc = "查詢全部")
@RequiresPermissions("sys:user:list")
@ResponseBody
@RequestMapping("/list")
public JsonResult list(HttpServletRequest request) {
PageParam<User> pageParam = new PageParam<>(request);
List<User> records = userService.listAll(pageParam.getNoPageParam());
return JsonResult.ok().setData(pageParam.sortRecords(records));
}
/**
* 根據id查詢使用者
*/
@OperLog(value = "使用者管理", desc = "根據id查詢")
@RequiresPermissions("sys:user:list")
@ResponseBody
@RequestMapping("/get")
public JsonResult get(Integer id) {
PageParam<User> pageParam = new PageParam<>();
pageParam.put("userId", id);
List<User> records = userService.listAll(pageParam.getNoPageParam());
return JsonResult.ok().setData(pageParam.getOne(records));
}
/**
* 字典管理
* Created by xiaomeng on 2021-03-14 11:29:03
* 技術交流加v:kafazixun
*/
@Controller
@RequestMapping("/sys/dict")
public class DictionaryController extends BaseController {
@Autowired
private DictionaryService dictionaryService;
@RequiresPermissions("sys:dict:view")
@RequestMapping()
public String view() {
return "system/dictionary.html";
}
/**
* 分頁查詢字典
*/
@OperLog(value = "字典管理", desc = "分頁查詢")
@RequiresPermissions("sys:dict:list")
@ResponseBody
@RequestMapping("/page")
public PageResult<Dictionary> page(HttpServletRequest request) {
PageParam<Dictionary> pageParam = new PageParam<>(request);
return new PageResult<>(dictionaryService.page(pageParam, pageParam.getWrapper()).getRecords(), pageParam.getTotal());
}
/**
* 查詢全部字典
*/
@OperLog(value = "字典管理", desc = "查詢全部")
@RequiresPermissions("sys:dict:list")
@ResponseBody
@RequestMapping("/list")
public JsonResult list(HttpServletRequest request) {
PageParam<Dictionary> pageParam = new PageParam<>(request);
return JsonResult.ok().setData(dictionaryService.list(pageParam.getOrderWrapper()));
}
/**
* 根據id查詢字典
*/
@OperLog(value = "字典管理", desc = "根據id查詢")
@RequiresPermissions("sys:dict:list")
@ResponseBody
@RequestMapping("/get")
public JsonResult get(Integer id) {
return JsonResult.ok().setData(dictionaryService.getById(id));
}
源獲取點選下面,關注彈出的公眾號圖,
回覆:精品課程
不是評論區回覆,不是評論區回覆,不是評論區回覆,
資料獲取加技術抱團,點選 關注👇🏻👇🏻👇🏻