diff --git a/novel-search/src/main/java/io/github/xxyopen/novel/search/config/EsConfig.java b/novel-search/src/main/java/io/github/xxyopen/novel/search/config/EsConfig.java index 1998dcd..61e8b9a 100644 --- a/novel-search/src/main/java/io/github/xxyopen/novel/search/config/EsConfig.java +++ b/novel-search/src/main/java/io/github/xxyopen/novel/search/config/EsConfig.java @@ -41,7 +41,7 @@ public class EsConfig { * fix `sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: * unable to find valid certification path to requested target` */ - @ConditionalOnProperty(value = "spring.elasticsearch.ssl.verification-mode",havingValue = "none") + @ConditionalOnProperty(value = "spring.elasticsearch.ssl.verification-mode", havingValue = "none") @Bean RestClient elasticsearchRestClient(RestClientBuilder restClientBuilder, ObjectProvider builderCustomizers) { diff --git a/novel-search/src/main/resources/application.yml b/novel-search/src/main/resources/application.yml index 2c8d9ad..f59bafb 100644 --- a/novel-search/src/main/resources/application.yml +++ b/novel-search/src/main/resources/application.yml @@ -9,6 +9,7 @@ spring: - https://127.0.0.1:9200 username: elastic password: Fy2JWjJ1hcO2mi1USFLR + # 设置 ssl 的认证模式,如果该配置项为 none ,说明不需要认证,信任所有的 ssl 证书。 # ssl: # verification-mode: none