基于Java?SpringBoot的前后端分離信息管理系統(tǒng)的設(shè)計和實現(xiàn)
前言
當(dāng)今社會,隨著科學(xué)技術(shù)的發(fā)展,以及市場經(jīng)濟(jì)的多元化,使人才的流動速度大大增加,因此也對黨建工作的管理層面工作帶來了空前且復(fù)雜的挑戰(zhàn), 從而使得如何高效的開展管理黨建工作成為了亟待解決的問題。為此將高速發(fā)展的信息科學(xué)技術(shù)引入到黨建工作管理的應(yīng)用中,力求合理有效的提升全面各項工作的進(jìn)展,實現(xiàn)以人為本的科學(xué)發(fā)展思想和意識,是一種高效可實現(xiàn)的方法。 Java作為一種面向?qū)ο蟮?、可以撰寫跨平臺應(yīng)用軟件的程序設(shè)計語言,其技術(shù)具有卓越的通用性、高效性、平臺移植性以及安全性,如今已廣泛應(yīng)用于 PC、數(shù)據(jù)中心、游戲控制臺、科學(xué)超級計算機(jī)、移動電話和互聯(lián)網(wǎng)等方面,大大方便了人們的生活、工作和娛樂。 而基于Java技術(shù)的黨建工作管理平臺,結(jié)合了Java技術(shù),從而可起到規(guī)范黨群業(yè)務(wù)流程,提高黨群工作管理效率,對于黨群工作定期提醒,以及完 成情況后的及時反饋,有效地提升黨群工作管理的標(biāo)準(zhǔn)化程度的作用;進(jìn)而實現(xiàn)黨群工作的網(wǎng)上信息交流和交互辦公,圖片資料保存與共享等功能。
視頻演示
基于Java-SpringBoot+vue的前后端分離信息管理系統(tǒng).mp4
主要功能說明
用戶登錄、修改密碼、首頁介紹、數(shù)據(jù)可視化樹狀圖展示、用戶管理、菜單管理、權(quán)限控制、角色管理、部門管理、角色管理、組織架構(gòu)管理、系統(tǒng)sql監(jiān)控、日志管理、通知公告管理、要聞管理、組織風(fēng)采管理、資料管理、查看、上傳富文本等、和查看下載附件信息。組織發(fā)展管理、考試管理以及退出等
功能截圖
登陸:根據(jù)用戶角色權(quán)限進(jìn)行登錄、用戶角色靈活控制。
系統(tǒng)主頁:
用戶管理:用戶的模糊查詢、添加、選擇部門、角色和職位等信息、以及修改和刪除等
?
職位管理:職位的模糊查詢、添加、權(quán)限控制以及修改和刪除等
菜單管理:菜單通過角色權(quán)限靈活控制、具體到按鈕級別
SQL監(jiān)控:
切面日志管理:
組織架構(gòu): 組織架構(gòu)的模糊查詢、添加、權(quán)限控制以及修改和刪除等
通知公告模塊:通知公告的模糊查詢、添加、權(quán)限控制以及修改和刪除等。和富文本筆記內(nèi)容
新聞模塊:
組織風(fēng)采模塊:
資料管理模塊:
組織發(fā)展模塊:
在線考試模塊:
修改密碼模塊
主要代碼實現(xiàn)
用戶登錄驗證?
/** * 登錄相關(guān) * * @author lyy * */ @RestController public class SysLoginController extends AbstractController { @Autowired private SysUserService sysUserService; @Autowired private SysUserTokenService sysUserTokenService; @Autowired private SysCaptchaService sysCaptchaService; /** * 驗證碼 */ @GetMapping("captcha.jpg") public void captcha(HttpServletResponse response, String uuid)throws IOException { response.setHeader("Cache-Control", "no-store, no-cache"); response.setContentType("image/jpeg"); //獲取圖片驗證碼 BufferedImage image = sysCaptchaService.getCaptcha(uuid); ServletOutputStream out = response.getOutputStream(); ImageIO.write(image, "jpg", out); IOUtils.closeQuietly(out); } /** * 登錄 */ @PostMapping("/sys/login") public Map<String, Object> login(@RequestBody SysLoginForm form)throws IOException { boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha()); // if(!captcha){ // return R.error("驗證碼不正確"); // } //用戶信息 SysUserEntity user = sysUserService.queryByUserName(form.getUsername()); //賬號不存在、密碼錯誤 if(user == null || !user.getPassword().equals(new Sha256Hash(form.getPassword(), user.getSalt()).toHex())) { return R.error("賬號或密碼不正確"); } //賬號鎖定 if(user.getStatus() == 0){ return R.error("賬號已被鎖定,請聯(lián)系管理員"); } //生成token,并保存到數(shù)據(jù)庫 R r = sysUserTokenService.createToken(user.getUserId()); return r; } /** * 退出 */ @PostMapping("/sys/logout") public R logout() { sysUserTokenService.logout(getUserId()); return R.ok(); }
shiro權(quán)限攔截放行:
/** * Shiro配置 * * @author lyy */ @Configuration public class ShiroConfig { @Bean("securityManager") public SecurityManager securityManager(OAuth2Realm oAuth2Realm) { DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(); securityManager.setRealm(oAuth2Realm); securityManager.setRememberMeManager(null); return securityManager; } @Bean("shiroFilter") public ShiroFilterFactoryBean shiroFilter(SecurityManager securityManager) { ShiroFilterFactoryBean shiroFilter = new ShiroFilterFactoryBean(); shiroFilter.setSecurityManager(securityManager); //oauth過濾 Map<String, Filter> filters = new HashMap<>(); filters.put("oauth2", new OAuth2Filter()); shiroFilter.setFilters(filters); Map<String, String> filterMap = new LinkedHashMap<>(); filterMap.put("/webjars/**", "anon"); filterMap.put("/druid/**", "anon"); filterMap.put("/app/**", "anon"); filterMap.put("/sys/login", "anon"); filterMap.put("/swagger/**", "anon"); filterMap.put("/v2/api-docs", "anon"); filterMap.put("/swagger-ui.html", "anon"); filterMap.put("/swagger-resources/**", "anon"); filterMap.put("/captcha.jpg", "anon"); filterMap.put("/aaa.txt", "anon"); filterMap.put("/virtuel/**", "anon"); filterMap.put("/image/**", "anon"); filterMap.put("/**", "oauth2"); shiroFilter.setFilterChainDefinitionMap(filterMap); return shiroFilter; } @Bean("lifecycleBeanPostProcessor") public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() { return new LifecycleBeanPostProcessor(); } @Bean public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) { AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor(); advisor.setSecurityManager(securityManager); return advisor; }
前端vue element登錄:
<template> <div class="site-wrapper site-page--login"> <div class="site-content__wrapper"> <div class="site-content"> <div class="brand-info"> <h1 class="brand-info__text">信息管理系統(tǒng)</h1> </div> <div class="login-main"> <h3 class="login-title">系統(tǒng)登錄</h3> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" status-icon> <el-form-item prop="userName"> <el-input v-model="dataForm.userName" placeholder="帳號"></el-input> </el-form-item> <el-form-item prop="password"> <el-input v-model="dataForm.password" type="password" placeholder="密碼"></el-input> </el-form-item> <el-form-item prop="captcha"> <el-row :gutter="20"> <el-col :span="14"> <el-input v-model="dataForm.captcha" placeholder="驗證碼"> </el-input> </el-col> <el-col :span="10" class="login-captcha"> <img :src="captchaPath" @click="getCaptcha()" alt=""> </el-col> </el-row> </el-form-item> <el-form-item> <el-button class="login-btn-submit" type="danger" @click="dataFormSubmit()">登錄</el-button> </el-form-item> </el-form> </div> </div> </div> </div> </template> <script> import { getUUID } from '@/utils' export default { data () { return { dataForm: { userName: '', password: '', uuid: '', captcha: '' }, dataRule: { userName: [ { required: true, message: '帳號不能為空', trigger: 'blur' } ], password: [ { required: true, message: '密碼不能為空', trigger: 'blur' } ], captcha: [ { required: true, message: '驗證碼不能為空', trigger: 'blur' } ] }, captchaPath: '' } }, created () { this.getCaptcha() }, methods: { // 提交表單 dataFormSubmit () { this.$refs['dataForm'].validate((valid) => { if (valid) { this.$http({ url: this.$http.adornUrl('/sys/login'), method: 'post', data: this.$http.adornData({ 'username': this.dataForm.userName, 'password': this.dataForm.password, 'uuid': this.dataForm.uuid, 'captcha': this.dataForm.captcha }) }).then(({data}) => { if (data && data.code === 0) { this.$cookie.set('token', data.token) this.$router.replace({ name: 'home' }) } else { this.getCaptcha() this.$message.error(data.msg) } }) } }) }, // 獲取驗證碼 getCaptcha () { this.dataForm.uuid = getUUID() this.captchaPath = this.$http.adornUrl(`/captcha.jpg?uuid=${this.dataForm.uuid}`) } } } </script> <style lang="scss"> .site-wrapper.site-page--login { position: absolute; top: 0; right: 0; bottom: 0; left: 0; //background-color: rgba(38, 50, 56, .6); overflow: hidden; &:before { position: fixed; top: 0; left: 0; z-index: -1; width: 100%; height: 100%; content: ""; background-image: url(~@/assets/img/login_bg.jpg); background-size: cover; } .site-content__wrapper { position: absolute; top: 0; right: 0; bottom: 0; left: 0; padding: 0; margin: 0; overflow-x: hidden; overflow-y: auto; background-color: transparent; } .site-content { min-height: 100%; padding: 30px 500px 30px 30px; } .brand-info { margin: 220px 100px 0 90px; color: #fff; } .brand-info__text { margin: 0 100px 220px 200px; font-size: 100px; font-weight: 400; text-transform : uppercase; } .brand-info__intro { margin: 10px 0; font-size: 16px; line-height: 1.58; opacity: .6; } .login-main { position: absolute; top: 0; right: 0; padding: 150px 60px 180px; width: 470px; min-height: 100%; background-color: #fff; } .login-title { font-size: 16px; } .login-captcha { overflow: hidden; > img { width: 100%; cursor: pointer; } } .login-btn-submit { width: 100%; margin-top: 38px; } } </style>
主要數(shù)據(jù)表設(shè)計
數(shù)據(jù)庫表結(jié)構(gòu)文檔
數(shù)據(jù)庫名:renren-dangyuan
文檔版本:V1.0.0
文檔描述:數(shù)據(jù)庫表設(shè)計描述
表dj_news
表exam
表 file
表inform
表sys_captcha (系統(tǒng)驗證碼)
表sys_config (系統(tǒng)配置信息表)
表sys_dept (部門管理)
表sys_log (系統(tǒng)日志)
表sys_menu (菜單管理)
表sys_oss (文件上傳)
表sys_role (角色)
表sys_role_dept (角色與部門對應(yīng)關(guān)系)
表sys_role_menu (角色與菜單對應(yīng)關(guān)系)
表sys_user (系統(tǒng)用戶)
表sys_user_role (用戶與角色對應(yīng)關(guān)系)
表sys_user_token (系統(tǒng)用戶Token)
表tb_user (用戶)
以上就是基于Java SpringBoot的前后端分離信息管理系統(tǒng)的設(shè)計和實現(xiàn)的詳細(xì)內(nèi)容,更多關(guān)于Java SpringBoot 信息管理系統(tǒng)的資料請關(guān)注腳本之家其它相關(guān)文章!
相關(guān)文章
Java中BigDecimal類與int、Integer使用總結(jié)
這篇文章主要給大家介紹了關(guān)于Java中BigDecimal類與int、Integer使用的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家學(xué)習(xí)或者使用Java具有一定的參考學(xué)習(xí)價值,需要的朋友們下面來一起學(xué)習(xí)學(xué)習(xí)吧2019-07-07java開發(fā)gui教程之jframe監(jiān)聽窗體大小變化事件和jframe創(chuàng)建窗體
這篇文章主要介紹了java開發(fā)gui教程中jframe監(jiān)聽窗體大小變化事件和jframe創(chuàng)建窗體的示例,需要的朋友可以參考下2014-03-03SpringMVC整合websocket實現(xiàn)消息推送及觸發(fā)功能
這篇文章主要為大家詳細(xì)介紹了SpringMVC整合websocket實現(xiàn)消息推送及觸發(fā)功能,具有一定的參考價值,感興趣的小伙伴們可以參考一下2018-03-03Java中的javaBean、vo、entity、domain和pojo
這篇文章主要介紹了Java中的javaBean、vo、entity、domain和pojo用法,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2022-12-12SpringBoot統(tǒng)一接口返回及全局異常處理高級用法
這篇文章主要為大家介紹了SpringBoot統(tǒng)一接口返回及全局異常處理高級用法示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2022-06-06詳解基于Spring Boot與Spring Data JPA的多數(shù)據(jù)源配置
本篇文章主要介紹了詳解基于Spring Boot與Spring Data JPA的多數(shù)據(jù)源配置,非常具有實用價值,需要的朋友可以參考下2017-05-05如何在Spring Boot應(yīng)用中優(yōu)雅的使用Date和LocalDateTime的教程詳解
這篇文章主要介紹了如何在Spring Boot應(yīng)用中優(yōu)雅的使用Date和LocalDateTime,本文通過實例代碼給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-07-07