参考文档 Spring Cloud Gateway官方文档处理跨域 配置类处理跨域 import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.reactive.CorsWebFilter; import org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource; @Configuration public class CorsConfig { @Bean public CorsWebFilter corsWebFilter(){ CorsConfiguration configuration = new CorsConfiguration(); configur.... 有更新! spring cloud gateway跨域 程序人生
webpack 全局安装webpack插件npm install webpack -g vue-cli 全局安装脚手架插件npm install -g @vue/cli-init 项目初始化 新建一个vue-cli-learn目录,在该目录下执行vue init webpack vue-cli-learn 然后回选择一系列配置,例如是否使用vue-router路由,是否使用ESLint,使用npm还是yarn作为包管理工具等,根据自己需要选择即可 vue脚手架项目初始化 程序人生
vue2 官方文档地址--介绍 — Vue.js (vuejs.org) 开发插件 开发在浏览器调试,浏览器界面很不友好,下载一个google浏览器插件,优化调试界面,通过点击下面的链接跳转,可以直接在对应的浏览器插件扩展管理安装,安装后记得启用插件,调试的时候会用到本地文件,要在插件管理里面开启允许访问文件URL vue-devtools安装教程 不同给浏览器得插件设置可以参考不同浏览器插件设置 也可以在git自己下载编译 github项目地址 使用效果如下 安装 新建目录,执行 npm init -y 执行 npm install vue@2.7.14安装 新建index.html页面 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div id="app"> <h1> {{userName}},你好 </h.... 有更新! vue学习笔记 程序人生
docker安装 1、卸载docker sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine 2、yum-utils安装 yum install -y yum-utils \ device-mapper-persistent-data \ lvm2 --skip-broken 3、yum源设置 # 设置docker镜像源 yum-config-manager \ --add-repo \ https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo sed -i 's/download.docker.com/mirrors.aliyun.com\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo yum makecache fast 4、安装dock.... 有更新! centos安装docker 程序人生
概念 ECMAScript是浏览器脚本语言的规范,Java script是规范的具体实现。 参考:1.1 ES6 教程 | 菜鸟教程 (runoob.com) 变量 let和var let 是在代码块内有效,var 是在全局范围内有效,下述代码打印时,会提示 a is not defined <script> { let a = 1; var b = 2; } console.log(a) console.log(b) </script> let声明的变量不能重复定义,var可以,下属代码运行提示 Identifier 'a' has already been declared <script> { let a = 1; let a = 1; var b = 2; var b = 3; } console.log(a) console.log(b) </script> var 存在变量提升,let不存在变量提升,下述代码,b打印结果为undefined,a打印提示 caught ReferenceError: Cannot acces.... 有更新! ES6学习笔记 程序人生
在package.json中添加下列代码即可 set NODE_OPTIONS=--openssl-legacy-provider && 实例: "scripts": { "pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ", "serve": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", "build:test": "vue-cli-service build --mode test", "build": "vue-cli-service build", "lint": "vue-cli-service lint" }, yarn run *** 报错 error:0308010C:digital envelope routines::unsupported 程序人生