## local
git config --local credential.helper store
git config --local user.username "username"
git confgi --local user.password "password"
我们了解到kubectl,它实在上是读取kube/config这个文件,向API Server发起请求。也就是kubectl的任何操作,都是携带这个文件向API Server获取数据的,显示到你当前的终端。
那这个提示就意味kube/config这个文件中的证书与API Server它的证书过期了。如果你使用kubeadm搭建的集群,它所有的证书默认存储在/etc/kubernetes/pki。这里面主要是k8s的证书和etcd使用的证书。这些证书默认有效期是1年。一旦过期,k8s集群就无法提供服务。
View DetailsETL,是英文Extract-Transform-Load的缩写,用来描述将数据从来源端经过抽取(extract)、转换(transform)、加载(load)至目的端的过程,是数据仓库的生命线。
View Details listen 443;
ssl_certificate 其他站点的证书;
ssl_certificate_key 其他站点的证书;
if ($server_port ~ 443){
rewrite ^(/.*)$ http://$host$1 permanent;
}
XSS攻击全称跨站脚本攻击,是为不和层叠样式表(Cascading Style Sheets, CSS)的缩写混淆,故将跨站脚本攻击缩写为XSS,XSS是一种在web应用中的计算机安全漏洞,它允许恶意web用户将代码植入到提供给其它用户使用的页面中。
下面给大家分享一下我的解决方案。
需要用到这个库:HtmlSanitizer
https://github.com/mganss/HtmlSanitizer
Maven项目打包时,如果遇到需要添加本地jar包依赖的时候,可以选择两种方法: 1. 安装到本地仓库 第一种方法比较常规,适用于需要添加的jar包也是由maven项目导出,含有pom文件的时候。只需要将jar包安装到本地maven仓库下,然后添加依赖即可。 (1)安装到本地仓库,执行以下命令(其中的-Dfile/-DgroupId/-DartifactId/-Dversion项根据pom文件内容填写):
1 |
mvn install:install-file -Dfile=xxxxx.jar -DgroupId=xxx.xxx.xxx -DartifactId=xxxxx -Dversion=1.0.0 -Dpackaging=jar |
(2)安装之后可以在本地仓库中找到对应的jar包。然后将对应的依赖信息插入到工程的pom文件即可:
1 2 3 4 5 |
<dependency> <groupId>xxx.xxx.xxx</groupId> <artifactId>xxxxx</artifactId> <version>1.0.0</version> </dependency> |
2. dependency中指定scope="system"和本地jar包路径 这种方法适用于其他方式导出的jar包,jar包中不含有pom信息,从而无法安装进本地仓库的情况。做法是:先配置本地jar包依赖,然后在build时将设置将jar包导出,同时配置manifest。 (1)配置本地jar包依赖(systemPath指向本地jar包路径):
1 2 3 4 5 6 7 |
<dependency> <groupId>com.amazonaws</groupId> <artifactId>aws-java-sdk-s3</artifactId> <version>1.11.0</version> <scope>system</scope> <systemPath>${project.basedir}/lib/xxx.jar</systemPath> </dependency> |
(2)在<build>的spring-boot-maven-plugin中设置将本地jar包导出到项目最终的依赖库中:
1 2 3 4 5 6 7 |
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin> |
(3)如果项目使用maven-jar-plugin插件打包的话,还需要在manifectEntries中添加对应的jar包信息;否则虽然jar包导出了,但是项目生成的MANIFEST.MF文件中没有对应的依赖信息,也会导致运行时找不到对应的class。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>lib/</classpathPrefix> <mainClass>XXXX</mainClass> </manifest> <manifestEntries> <Class-Path>./ lib/xxxxx.jar</Class-Path> </manifestEntries> </archive> <outputDirectory> ${project.build.directory}/XXXXX </outputDirectory> </configuration> </plugin> |
(4)最后附上一个项目完整的<build>配置(该配置可以将最终生成的jar包和依赖库、配置文件分开)。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
<build> <finalName>XXXXX</finalName> <sourceDirectory>src/main/java</sourceDirectory> <resources> <resource> <directory>src/main/resources</directory> <targetPath>${project.build.directory}/XXXXX</targetPath> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> </resources> <testSourceDirectory>src/test/java</testSourceDirectory> <testResources> <testResource> <directory>src/test/resources</directory> <filtering>true</filtering> <excludes> <exclude>**/*.java</exclude> </excludes> </testResource> </testResources> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skipTests>true</skipTests> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory> ${project.build.directory}XXXXX/lib </outputDirectory> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>lib/</classpathPrefix> <mainClass>xxx.xxx.XXXXX</mainClass> </manifest> <manifestEntries> <Class-Path>./ lib/xxxxx.jar</Class-Path> </manifestEntries> </archive> <outputDirectory> ${project.build.directory}/XXXXX </outputDirectory> </configuration> </plugin> </plugins> </build> |
from:https://www.cnblogs.com/strugglion/p/12513956.html
View Detailschrome内核的浏览器和火狐浏览器均可通过pdf内置javaScript脚本进行xss攻击,这是由于pdf本身支持携带js脚本,且浏览器解析时自动解析js脚本所致,
处理方法:
方法1:还可以加上在线预览改为强制下载。
方法2:禁止上传带有js脚本的pdf文件(本文采用)
View Detailslt:less than 小于 le:less than or equal to 小于等于 eq:equal to 等于 ne:not equal to 不等于 ge:greater than or equal to 大于等于 gt:greater than 大于 from:https://blog.csdn.net/Radiation_ONE/article/details/108425074
View DetailsHive是基于Hadoop构建的一套数据仓库分析系统,它提供了丰富的SQL查询方式来分析存储在Hadoop分布式文件系统中的数据:可以将结构化的数据文件映射为一张数据库表,并提供完整的SQL查询功能;可以将SQL语句转换为MapReduce任务运行,通过自己的SQL查询分析需要的内容,这套SQL简称Hive SQL,使不熟悉mapreduce的用户可以很方便地利用SQL语言查询、汇总和分析数据。
而mapreduce开发人员可以把自己写的mapper和reducer作为插件来支持Hive做更复杂的数据分析。它与关系型数据库的SQL略有不同,但支持了绝大多数的语句如DDL、DML以及常见的聚合函数、连接查询、条件查询。它还提供了一系列的工具进行数据提取转化加载,用来存储、查询和分析存储在Hadoop中的大规模数据集,并支持UDF(User-Defined Function)、UDAF(User-Defined AggregateFunction)和UDTF(User-Defined Table-Generating Function),也可以实现对map和reduce函数的定制,为数据操作提供了良好的伸缩性和可扩展性。
Hive不适合用于联机(online)事务处理,也不提供实时查询功能。它最适合应用在基于大量不可变数据的批处理作业。