maven

what is this maven certification error indicates?

大憨熊 提交于 2021-02-08 08:27:19
问题 [ERROR] Non-resolvable parent POM for com.example:dynamoWork:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.0.RELEASE from/to artie (https://repo.maven.apache.org/maven2/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at no local POM @ line 14, column 10 ->

面试:如何从大量的 URL 中找出相同的 URL?

♀尐吖头ヾ 提交于 2021-02-08 07:54:52
来源 | http://8rr.co/FR7V 题目描述 给定 a、b 两个文件,各存放 50 亿个 URL,每个 URL 各占 64B,内存限制是 4G。请找出 a、b 两个文件共同的 URL。 解答思路 每个 URL 占 64B,那么 50 亿个 URL占用的空间大小约为 320GB。 5, 000, 000, 000 * 64B ≈ 5GB * 64 = 320GB 由于内存大小只有 4G,因此,我们不可能一次性把所有 URL 加载到内存中处理。对于这种类型的题目,一般采用 分治策略 ,即:把一个文件中的 URL 按照某个特征划分为多个小文件,使得每个小文件大小不超过 4G,这样就可以把这个小文件读到内存中进行处理了。 思路如下 : 首先遍历文件 a,对遍历到的 URL 求 hash(URL) % 1000 ,根据计算结果把遍历到的 URL 存储到 a0, a1, a2, ..., a999,这样每个大小约为 300MB。使用同样的方法遍历文件 b,把文件 b 中的 URL 分别存储到文件 b0, b1, b2, ..., b999 中。这样处理过后,所有可能相同的 URL 都在对应的小文件中,即 a0 对应 b0, ..., a999 对应 b999,不对应的小文件不可能有相同的 URL。那么接下来,我们只需要求出这 1000 对小文件中相同的 URL 就好了。 接着遍历

Maven read environment variable in properties file

混江龙づ霸主 提交于 2021-02-08 07:44:30
问题 How to read system environment variables in a properties file. I am using MyBatis maven plugin for database migrations. MyBatis use properties file basing on the environment. I am trying to read environment variable inside properties file like: development.properties username=${env.username} password=${env.password} Error: FATAL: role "${env.username}" does not exist I stored username and password in a ".profile" file on a mac. What's the correct way to read those variables? 回答1: You should

支付宝支付-支付宝PC端扫码支付

一笑奈何 提交于 2021-02-08 07:42:42
前言 支付宝支付—沙箱环境使用 支付宝支付-支付宝PC端扫码支付 「 本文 」 支付宝支付-手机浏览器H5支付 PC端扫码支付,其实就是就是 电脑网站支付 ,本文基于支付宝沙箱环境,不了解的可以看一下上边的链接。 废话不多说,直接进入主题。 下载运行测试Demo 官方 Demo 下载链接: 电脑网站支付(Java) 下载后导入 IDEA 中运行如下图所示: 如果在导入运行过程遇到错误,请参考这篇文章: IDEA中导入支付宝电脑网站支付测试Demo遇到的错误 进行支付测试,注意付款要用沙箱环境提供的支付宝 APK 。 Maven项目中使用 pom.xml中引入支付宝sdk依赖 < dependency > < groupId > com.alipay.sdk </ groupId > < artifactId > alipay-sdk-java </ artifactId > < version > 3.1.0 </ version > </ dependency > 配置可以单独创建一个类,静态初始化参数: public class AlipayConfig { // [沙箱环境]应用ID,您的APPID,收款账号既是您的APPID对应支付宝账号 public static String app_id = "" ; // [沙箱环境]商户私钥,您的PKCS8格式RSA2私钥

maven-dependency-plugin: exclude .jar files

青春壹個敷衍的年華 提交于 2021-02-08 07:39:49
问题 I am using maven-dependency-plugin. I need to download only a ZIP file and exclude all jar files. Plugin configuration looks the following way. <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <!-- <outputDirectory>${project.build.directory}</outputDirectory> --> <overWriteReleases>false</overWriteReleases> <overWriteSnapshots>false</overWriteSnapshots> <overWriteIfNewer>true</overWriteIfNewer> <excludes>**/*.jar<

Which JAXB version was used in Java 8?

天大地大妈咪最大 提交于 2021-02-08 06:52:49
问题 JAXB (Java Architecture for XML Binding) has been publised as Maven artifacts although it was bundled with JREs until Java 8 (and Java 9/10 with an option). My question here is: Which JAXB version on Maven Central corresponds to Java 8's bundled version? (And, also for Java 9/10's under a feature option?) I'm seeing in https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api : 2.2.* (~ 2.2.12) 2.3.0 2.3.1 2.4.0-* (under development) (3.0.0 to be jakarta.xml.* ) 回答1: As far as Java 8: $ $(

Which JAXB version was used in Java 8?

岁酱吖の 提交于 2021-02-08 06:51:21
问题 JAXB (Java Architecture for XML Binding) has been publised as Maven artifacts although it was bundled with JREs until Java 8 (and Java 9/10 with an option). My question here is: Which JAXB version on Maven Central corresponds to Java 8's bundled version? (And, also for Java 9/10's under a feature option?) I'm seeing in https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api : 2.2.* (~ 2.2.12) 2.3.0 2.3.1 2.4.0-* (under development) (3.0.0 to be jakarta.xml.* ) 回答1: As far as Java 8: $ $(

Excluding .xml and properties from standalone JAR with spring-boot-maven-plugin

自作多情 提交于 2021-02-08 06:47:48
问题 I have a working standalone JAR maven/spring boot app. It currently has its applicationContext.xml and application.properties files in the JAR within /src/main/resources/. For the sake of easily being able to reconfigure without redeploying, I would like to move the .xml file and the .properties file outside of the jar. I've setup the maven-antrun-plugin so it copies those resources into the target directory. However, I'm having difficulty getting these two files (.xml and .properties)

maven zip uber-jar and shell script

冷暖自知 提交于 2021-02-08 06:21:15
问题 I would like maven to combine an uber-jar created by the shade-plugin and a shell script from the all_files directory. The project structure looks like this: all_files/ mvn_script.sh projB-shaded.jar maven_project/ guide/ parent-pom.xml projA/ pom.xml projB/ pom.xml The jar is produced by projectB's pom file and then placed into the outtermost folder to be ready to be zipped with the shell script. The reason is so that the shell script can call the jar file to execute the project. I want

SpringBoot maven build war using specific application.properties

断了今生、忘了曾经 提交于 2021-02-08 05:09:00
问题 I have a Spring Boot application with has three application.properties files : application.properties application-qa.properties application-prod.properties I want build a war using maven by using one of the properties depending on the environment the application with be deployed too i.e dev , qa or prod . How can I do this. I'm pretty new to Spring Boot. 回答1: Setting the SPRING_PROFILES_ACTIVE environment variable will activate the intended profile. for example, in order to activate the qa