YUM安装docker-compose
Docker Compose简介Docker Compose是一个用于定义和运行多容器Docker应用程序的工具。通过Compose,您可以使用YAML文件来配置应用程序的服务,然后使用一个命令创建并启动所有服务。它极大地简化了容器编排工作,特别适合开发、测试和CI工作流程。
安装前提在安装Docker Compose之前,请确保您的系统已经安装了Docker。您可以通过以下命令检查Docker是否已安装:
1docker --version
如果未安装Docker,请先安装Docker:
123yum install -y dockersystemctl enable dockersystemctl start docker
使用YUM安装Docker Compose1. 添加EPEL源EPEL (Extra Packages for Enterprise Linux) 是为企业级Linux提供额外软件包的仓库,它包含了许多在标准仓库中不可用的软件包,包括docker-compose。
1yum install -y epel-release
2. 安装Docker Compo ...
富文本及formatter的使用
先看效果图:该饼图统计总共的数据,其中每块饼图旁边显示了3条相应的详细数据
其中后端提供的数据结构如下123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869{ "code": 0, "randomSelectedList": [ { "username": "a1", "newsName": "北京大学-悉尼大学食物安全和农业可持续发展联合中心揭牌仪式暨学术研讨会举行" }, { "username": "a1", "newsName": "“沉浸式传播视域下传统文化+虚拟现实的创新路径”研讨会在 ...
通用dockerfile文件
先写项目的启动脚本,命名为run.sh1234567891011121314151617181920212223#!/bin/shif [ -z $JAVA_OPTS ];then JAVA_OPTS="-Xms256m -Xmx512m"fiif [ -z $JAR_PATH ];then JAR_PATH="/opt/server"fiif [ -z $EXAM_ENV ];then EXAM_ENV="prod"fiif [ x$LOG != "xfalse" ];then mkdir -p logs LOGGING_OPT="--logging.path=./logs"fiecho $JAVA_OPTS -Dlogging.path=./logs -DSpring.profiles.active=$EXAM_ENV -jar ${JAR_PATH}/*.jarjava $JAVA_OPTS -Dlogging.path=./log ...
加密yml文件
1. 低版本2.x引入依赖12345<dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artifactId> <version>2.1.0</version></dependency>
手动引入依赖(内网环境)
12345678910<dependency> <groupId>org.jasypt</groupId> <artifactId>jasypt</artifactId> <version>1.9.2</version></dependency><dependency> <groupId>com.github.ulisesbocchio</groupId> < ...
Vue2设置通知提醒框
可自定义设置以下属性:
自动关闭的延时时长(duration),单位ms,默认4500ms
消息从顶部弹出时,距离顶部的位置(top),单位px,默认24px
消息从底部弹出时,距离底部的位置(bottom),单位px,默认24px
消息弹出位置(placement),可选:左上topLeft,右上topRight(默认),左下bottomLeft,右下bottomRight
调用时可选以下五个方法对应五种不同样式:
this.$refs.notification.open(notification) // 默认使用
this.$refs.notification.info(notification) // info调用
this.$refs.notification.success(notification) // success调用
this.$refs.notification.error(notification) // error调用
this.$refs.notification.warn ...
Layui实现放大图片的效果
需要在表格里面添加查看图片的模板
123<div style="width: 400px;height: 200px" onclick="showLarge('../images/lidong.jpg')"> <img height="100%" width="100%" src="../images/lidong.jpg" alt=""></div>
放大的function
123456789101112131415161718192021222324252627<script type="text/javascript" >//查看大图 function showLarge(src) { layer.photos({ photos: { "title&quo ...
镜像
npm
1npm config set registry https://registry.npmmirror.com
nvm
12node_mirror: https://npmmirror.com/mirrors/node/npm_mirror: https://npmmirror.com/mirrors/npm/
python
1pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
kali
1234567891011121314151617181920中科大 deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib 阿里云 deb http://mirrors.aliyun.com/kali kali-rolling main non-free cont ...
Vue2使用g2
标题其实vue2和vue3用法差不多,使用的g2也是5.x的预防,其中的区别就是script块的写法不太一样,vue3更简洁更方便
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 ...
跨域访问
问题使用Vue对后台的资源进行访问,发生跨域的请求,会产生如下的报错
Access to fetch at ‘http://localhost:8080/hdfs/read-csv?path=/output/hdfsJobByMonth/part-r-00000‘ from origin ‘http://localhost:9528‘ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.
这个错误表明前端应用(运行在 http://localhost:9528)试图通过 fetch API 访问后端服务(运行在 http://localhost:8080)的某个资源,但是由于跨域资源 ...
privateMap.get is not a function
问题描述在使用G2图表库进行数据可视化开发时,可能会遇到以下错误:
1Uncaught (in promise) TypeError: privateMap.get is not a function
这个错误通常出现在G2图表渲染过程中,特别是在使用最新版本的G2(如G2 4.x)时。错误信息来自于tslib.es6.js文件的第233行,这是TypeScript运行时库的一部分,用于支持TypeScript编译后的JavaScript代码。
错误原因分析这个错误主要是由于缺少tslib依赖引起的。G2图表库是基于TypeScript开发的,它在运行时依赖tslib提供的一些辅助函数,特别是与私有字段和方法相关的功能。
当项目中没有正确安装tslib或者版本不匹配时,就会出现privateMap.get is not a function这样的错误,这表明TypeScript的私有字段实现无法正常工作。
解决方案解决这个问题的方法非常简单,只需要在项目中安装tslib依赖:
12345# 使用npmnpm install --save tslib# 或者使用yarnyarn add ...
�ȵ���






