【问题标题】:This springboot ssl never works这个 springboot ssl 从不工作
【发布时间】:2022-10-03 05:35:29
【问题描述】:

我在 Spring Boot 上正确配置了 ssl:

server.port=8443 
server.ssl.key-store=classpath:springboot.p12 
server.ssl.key-store-password=*****  
server.ssl.key-store-type=PKCS12

无论我尝试什么端口,它总是说相同的:配置为侦听port 8443 的 Tomcat 连接器无法启动。该端口可能已在使用中,或者连接器可能配置错误。行动:验证连接器的配置,识别并停止侦听端口 8443 的任何进程,或配置此应用程序以侦听另一个端口。 Springboot不会启动应用程序,它作为一个框架太可怕了,无法调试它。 任何有经验的开发人员都能知道这样一个永远困扰我的错误?!

  • 似乎其他东西已经在端口 8443 上运行。如果您在 Linux 或 Mac 上,您可以使用 \"lsof -i -P -n | grep 8443\" 找到它
  • 没有。我检查了窗户。 @NullishByte
  • 在 Windows 上,它使用 netstat -aof | findstr :8443 工作(来源:How can you find out which process is listening on a TCP or UDP port on Windows?
  • 已经试过很多次了,还是别的。 @丹尼尔W。

标签: spring-boot


【解决方案1】:

它必须完全使用这种方式才能使其工作:

https://mkyong.com/spring-boot/spring-boot-ssl-https-examples/

【讨论】:

    【解决方案2】:

    它的 apache2 使用它:

         SSLEngine On
        SSLCertificateFile /abc.crt
        SSLCertificateKeyFile /abc.key
        SSLCertificateChainFile /abc.ca-bundle
    

    【讨论】:

      猜你喜欢
      • 2023-03-13
      • 2017-08-09
      • 1970-01-01
      • 2016-02-25
      • 2015-11-10
      • 2018-12-01
      • 2021-10-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多