Java1.8证书问题
0
今天搭建一个项目环境,因为用的时Java1.8
,最开始用的系统自带的,但是发现编译不了,提示如下错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project jshERP-boot: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
所以就去openjdk
下载了一个安装包,但是编译又提示错误:
Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.20.1 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.20.1 -> org.apache.maven.surefire:maven-surefire-common:jar:2.20.1: Failed to read artifact descriptor for org.apache.maven.surefire:maven-surefire-common:jar:2.20.1: Could not transfer artifact org.apache.maven.surefire:maven-surefire-common:pom:2.20.1 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.20.1/maven-surefire-common-2.20.1.pom: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]
这个问题需要我们更新一下java-se-8u42-ri/jre/lib/security/cacerts
这个文件,只要下一个新的jdk
然后找到这个文件替换即可。
还有配置antd
的nginx
代理,由于antd
切换页面时地址栏会改变,所以需要配置try_files $uri /index.html;
来解决刷新404
问题。