# rbac_demo **Repository Path**: burns/rbac_demo ## Basic Information - **Project Name**: rbac_demo - **Description**: rbacdemo - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-11-11 - **Last Updated**: 2022-12-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README https://www.bilibili.com/video/BV1M94y1D7eF/?p=2&spm_id_from=333.1007.top_right_bar_window_history.content.click&vd_source=761d34de02c35c16475eb7469d68e73c 分页:前端传curent,size,其中current表示当前页,size是当前页要展示的数据 fastjson替换springmvc默认使用的jackson https://www.bilibili.com/video/BV1M94y1D7eF/?p=4&spm_id_from=pageDriver&vd_source=761d34de02c35c16475eb7469d68e73c 统一校验:https://blog.csdn.net/weixin_43934939/article/details/124630479 全局异常处理:GlobalException 代码生成器:https://www.renren.io/ renren-generator:https://gitee.com/renrenio/renren-generator?utm_source=alading&utm_campaign=repo ## jwt json web token: https://jwt.io/ jwt 可以设置header payload 签名 过期时间 具有自校验功能 ### JWTUtils 生成token 校验token 解析token ## ThreadLocal 登录后统一保存token ## 安装node 安装完node后自动带有npm工具 ## 安装cnpm npm install -g cnpm --registry=https://registry.npm.taobao.org ## vue-cli 构建vue项目的工具;用cnpm全局安装vue-cli; ## 使用cnpm安装vue-cli脚手架 cnpm install vue-cli -g ## 使用webpack快速创建项目 vue init webpack hello-vue https://www.bilibili.com/video/BV1M94y1D7eF/?p=15&spm_id_from=pageDriver&vd_source=761d34de02c35c16475eb7469d68e73c ## vue使用过程 1、引入 import MyHello from './components/MyHello' 2、注册 components: { HelloWorld, // 2、注册 MyHello } 3、使用 ## vue项目启动 npm run dev ## vue项目打包 npm run build 打包放在dist文件夹中 https://burns.blog.csdn.net/article/details/127869028?spm=1001.2014.3001.5502 # 路由 https://www.bilibili.com/video/BV1M94y1D7eF/?p=17&spm_id_from=pageDriver&vd_source=761d34de02c35c16475eb7469d68e73c ## 路由插件 vue-router https://router.vuejs.org/zh/ ### 安装路由插件 npm install vue-router@4 或 cnpm install vue-router@4 或 yarn install vue-router@4 ### 配置路由表,配置路由和视图 https://blog.csdn.net/qq_52185114/article/details/119360397 ## vue VueRouter VueAxios Vuex vue——>视图展示 VueRouter——>路由管理 VueAxios——>Ajax异步请求 Vuex——>保存数据到本地 ### Axios http://www.axios-js.com/ Axios是对Ajax的一个封装,可以完成请求的发送 ### 安装Axios npm install axios npm install --save axios vue-axios http://www.axios-js.com/zh-cn/docs/vue-axios.html ## 跨域问题处理 ### 后端跨域处理 ``` java @Configuration//注释掉拦截器,等添加完登录后再添加拦截器 public class WebMvcConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedMethods("*") .allowedOrigins("*") .allowedHeaders("*"); } } ``` ## 前端debugger;调试 合适的地方加debugger; ``` javascript this.axios({ url: "http://localhost:8080/emp/save", method: "post", data: this.empForm }).then(response => { debugger; console.log(response); if (response.data.code == 200) { //提示用户添加成功 this.$message({ showClose: true, message: '添加成功', type: 'success' }); } else { //提示用户添加失败原因 } }).catch(error => { console.log(error); }); ``` https://www.bilibili.com/video/BV1M94y1D7eF/?p=22&spm_id_from=pageDriver&vd_source=761d34de02c35c16475eb7469d68e73c ## 项目上云方式 https://blog.csdn.net/allen_csdns/article/details/104554928 ### 打包 mvn clean package -Dmaven.test.skip=true