springboot+vue.js+fastdfs+redis私有云存儲方案 網盤 文件管理系統 實戰開發分享

囉嗦幾句

最近在帶一個項目組開發雲盤系統,這裏給大家分享一下如何使用springboot開發雲盤,幫助大家增長開發經驗,奧利給,開!

開發技術

後端
springboot
mybatis-plus
redis
fastdfs文件服務器
shiro
quartz定時任務

前端
vue.js layUI

功能

前臺功能
前臺功能
後臺功能
後臺功能
運行截圖
登錄
實現代碼如下:

	/**
	 * 前端認證
	 * @return
	 */
	@PostMapping("/authenticationFront")
	public Result authenticationFront(User user,
			@RequestParam(value = "rememberMe",defaultValue = "0")Boolean rememberMe,
			ServletRequest request) {
		try {
			userService.loginFront(user,rememberMe);
			return new Result().success().put(Constant.AUTHENTICATION_KEY, AppUtil.getSessionId());
		} catch (IncorrectCredentialsException e) {
            return new Result().error().msg("密碼錯誤");
        } catch (UnknownAccountException e){
            return new Result().error().msg("用戶不存在");
        } catch (UserLoginedException e){
            return new Result().error().msg("此用戶已登錄");
        } catch(UnAllowLoginException e) {
        	return new Result().error().msg("此用戶不允許登入");
        } catch(Exception e) {
			e.printStackTrace();
			throw new BusException("認證失敗");
		}
	}

用戶登陸後頁面

共享文件
後臺登錄
實現代碼如下:

	/**
	 * 後端認證
	 * @return
	 */
	@PostMapping("/authenticationBack")
	public Result authenticationBack(User user,
			@RequestParam(value = "rememberMe",defaultValue = "0")Boolean rememberMe) {
		try {
			userService.loginBack(user,rememberMe);
			return new Result().success();
		} catch (IncorrectCredentialsException e) {
            return new Result().error().msg("密碼錯誤");
        } catch (UnknownAccountException e){
            return new Result().error().msg("用戶不存在");
        } catch (UserLoginedException e){
            return new Result().error().msg("此用戶已登錄");
        } catch(UnAllowLoginException e) {
        	return new Result().error().msg("此用戶不允許登入");
        } catch(Exception e) {
			e.printStackTrace();
			throw new BusException("認證失敗");
		}
	}

後臺管理系統

運行所需包

開發支持包

開發資料

開發資料

運行視頻

吊炸天springboot+vue.js+fastdfs+redis私有云存儲方案 企業網盤 雲盤 文件管理

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章