

- netstat -aon|findstr "8080"
- tasklist|findstr "9524"
- taskkill /f /t /im java.exe
导入别人项目运行npm install 导致 npm ERR! cb()never called!
然后根据教程
npm cache clean -f
npm install -g n --force
n stable
npm install如果 npm 慢:
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install
npm 和 cpm 只是包管理器(也就是下载网址不同)nrm ls 可以查看
- 报错:
cmd 里面,在cmd 运行" n stable"报错"’“bash”’ 不是内部或外部命令,也不是可运行的程序 或批处理文件。
vscode Terminal 里面, & : 无法将“bash.exe”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。
-
解决方法:
- github 搜索 gnvm,放在node.js的安装目录下
gnvm update latest
gnvm use [enter the newest version]
n : 无法加载文件 E:\Apps\dev-Install\npm\n.ps1,因为在此系统上禁止运行脚本。
后端
Springcloud
前端
-
Nuxt.js 渲染便于爬虫
-
Vue (因此否定了其他 LayUI 的东西)
-
<!-- 添加标签导航栏 -->
1: 引入 TagsView + TagsView/index.js 到 @/layout/components/
2: 在@/layout/components/index.js 导出TagsView
3: 在 @/layout/components/index.vue 导入 到父组件
4: 引用标签栏导航组件
5: 添加样式
(缓存)6: 在 AppMain.vue 加入 keep-alive
7: 在 @/store/modules 导入 tagsview.js 模块
(缓存)8: 更新getters.js 模块 -
分页查询
- Mock 添加模拟数据列表接口
- src/api 创建 js
- 对应component 里面的index.vue 引入上述 js
- 测试
- 状态码转名称(filters:{} 重构模板状态)
- 永久使用
npm config set registry https://registry.npm.taobao.org
- VS Code 使用 Git push 到远程仓库 Permission Denied(publickey)
- 起因:自己想改名,没用 git rename
- 报错:Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists. - 原因:从提示中,我们知道原因是没有权限。根本原因是我们在 Git 中设置了 passphrase,也就是,如果我们使用 Git 命令行方式提交时,会让我们输入密码:
我们只有输入正确的 passphrase 才可以 push。
但是在 VS Code 中使用 Git 的话,不会有弹窗输入这个 passphrase!
而且 vscode 还会帮你自动 add
解决方法:
1 win/cmd + r 启动命令行
2 输入 start-ssh-agent 启动 ssh,并输入 passphrase
3 命令行中输入 code 启动 VS Code
-
首页 --- 导入 echart 时报错
-
编译报错1:
“export ‘default‘ (imported as ‘echarts‘) was not found in ‘echarts‘ -
运行时报错2:
Could not find a declaration file for module 'echarts/theme/macarons'.
原因:最新的5.0版本的echarts中的echarts/lib/echarts.js
里没有module.export ,也没有export default -
除此之外,ESLint 代码家检测工具报错3:在下述代码报错
require('echarts/theme/macarons') // 主题
代码编辑器里面报错
TypeError: Cannot read property 'init' of undefined
定位到代码行里面的 initChart() 函数报错
initChart() {
// 初始化实例时,指定主题
this.chart = echarts.init(this.$refs.main, 'macarons')
} -
解决方法:
// import echarts from "echarts";
// 修改为
import * as echarts from 'echarts'
MySQL WorkBench 如何导出数据库
Serve -> Data Export -> Objects to Export (三个选项全选)
单点登录系统
组成:头部、中间主区域、底部
Mock.js 封装 Axios 向后台发送数据
Vuex 登录,退出状态管理
后台权限系统 整合 单点登录系统
登录功能
- 业务逻辑:
-> 如果没有token跳转单点登录系统
-> 登录完成后,用 Axios 带上 Token 重定向 后台权限管理系统
在 后台权限系统那边:
- 如果没有 token ,跳转认证客户端
- 配置 全局变量 .env.production
- 路由器拦截认证信息,并重写 getToken()方法(跟单点登录系统的 cookie 的封装保持一致),没有就重定向
在 单点登录系统 那边:
-
请求头加上 token
-
退出:
-
刷新令牌:
注册全局权限指令
- src/directive/index.js
- directive/permission/index.js
- main.js 引入 directive/index.js,使用 Vue.use() 全局注册
四个表
Mysql 重置密码
mysqladmin -uroot -p123456 password 123
运维环境
Nacos
sh startup.sh -m standalone
startup.cmd -m standalone
Redis
redis-server.exe
./src/redis-server
后端报错
Unable to connect to Redis
-
查看有没有启动Redis服务器。
-
redis的配置application.yml(或application.properties)中
spring.redis.timeout连接超时时间(毫秒)中设置不能为0,
一般修改如下:spring.redis.timeout=5000。 -
找到redis的配置文件 redis.conf : 执行 vim redis.conf
- protected-mode yes 改为 protected-mode no (即该配置项表示是否开启保护模式,默认是开启,开启后Redis只会本地进行访问,拒绝外部访问)。
- 注释掉 bin127.0.0.1 即 #bin 127.0.0.1 (ps: 不注释掉,表示指定 redis 只接收来自于该 IP 地址的请求,注释掉后,则表示将处理所有请求)。
-
如果在Redis中没有配置requirepass ,那么在application.properties(或application.yaml)中就不要写spring.redis.password。
目录模板
├── dist // 构建打包生成部署文件
│ ├── 1805021549 // 静态资源(18年05月03日15时49分)
│ ├── config // 配置
│ ├── index.html // index.html入口
├── build // 构建相关
├── config // 构建配置相关
├── src // 源代码
│ ├── assets // 静态资源
│ ├── components // 全局公用组件
│ ├── element-ui // element-ui组件配置
│ ├── element-ui-theme // element-ui组件主题配置
│ ├── icons // 所有 svg icons
│ ├── mock // mock 模拟数据
│ ├── router // 路由
│ ├── store // 全局 store管理
│ ├── utils // 全局公用方法
│ ├── views // view
│ ├── App.vue // 入口组件
│ ├── main.js // 入口
├── static // 第三方不打包资源
│ ├── config // 全局变量配置
│ ├── plugins // 插件
├── .babelrc // babel-loader 配置
├── eslintrc.js // eslint 配置项
├── .gitignore // git 忽略项
├── favicon.ico // favicon图标
├── index.html // html模板
└── package.json // package.json