无法启动网络服务器;嵌套异常是 org.springframework.boot.web.server.WebServerException:无法加载密钥

问题描述 投票:0回答:1

任何人都可以帮助我解决以下错误

org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Could not load key store 'null'

我已将密钥存储文件放在项目之外。我还使用 keytool list 命令检查密钥文件。应用程序仍然没有启动。

我正在使用java 11,maven 3.6.3。 Spring Boot 2.3.2 发布

我没有找到任何解决方案。

但我尝试在项目内部加载密钥库,在项目外部添加新的密钥文件。北移工作。

java spring spring-boot
1个回答
1
投票

将密钥库属性添加到管理端口后已修复。

management:
  endpoints:
    web:
      exposure:
         include: ["health", "info", "metrics", "prometheus", "bindings", "beans", "env", "loggers","actuator"]
      base-path: /
      path-mapping:
        prometheus: metrics
    prometheus:
      enabled: true
  server:
    port: ${npbprog.metrics.server.port}
    ssl:
      enabled: true 
       key-store: ${ssl.key-store}
    key-store-type: ${ssl.key-store-type}
    key-store-password: ${ssl.key-store-password}
    key-password: ${ssl.key-password}
    key-alias: ${ssl.key-alias}
    protocol: TLS 
    enabled-protocols: 
    - TLSv1.2  
© www.soinside.com 2019 - 2024. All rights reserved.