【发布时间】:2020-12-07 17:44:05
【问题描述】:
我有一个 spring 项目,其中所有端点都在运行 https,这在尝试运行 mvn verify -Dspring.application.admin.enabled=true -Dspring-boot.run.profiles=dev 时会导致以下错误。有没有办法指定证书路径?或者使用spring security仅使此端点http而不是https的方法。
错误:
[ERROR] An error has occurred
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path
building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
Pom.xml
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.0.RELEASE</version>
<executions>
<execution>
<id>pre-integration-test</id>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>post-integration-test</id>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<apiDocsUrl>https://localhost:8444/v3/api-docs</apiDocsUrl>
</configuration>
</plugin>
【问题讨论】:
标签: spring-boot maven openapi springdoc