通用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 ...
Can't find dependent libraries
问题在部署hadoop项目过程中,出现了这个报错Exception in thread “main” java.lang.UnsatisfiedLinkError: E:\winutils-master\hadoop-3.3.5\bin\hadoop.dll: Can’t find dependent libraries这个报错大概意思就是:dll缺所需的依赖
解决办法使用depends来查找所缺的依赖,该工具的下载地址:depends
使用的时候直接把dll文件拽进去等着搜索就行了 如图可以看到缺了哪些依赖,直接上网搜索添加即可只需要查看第一层即可
depends查找很慢
创建run_depends.txt文件
输入以下内容(两行)
12set PATH="""D:\Tools\depends\depends22_x64\depends.exe"
注意要讲上面的路径改成depends的路径
将run_depends.txt后缀名改为bat
然后直接启动这个bat文件就可以了,这样查找很快速
炫酷的border样式
1234<div class="item" info="彩虹边框"> <div></div></div>
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859div.item div{ --borderWidth: 12px; --bRadius: 5px; width: 60%; height: 60%; position: relative; z-index: 0; overflow: hidden; padding: 2rem; z-index: 0; border-radius: --bRadius; &::after, &::before { box-sizing: border-box; } ...
�ȵ���







