나는 Spring Boot에서 https를 활성화하는 가이드를 따라 갔다. 내가 main 메소드를 실행하는 경우를 시작,https 후 스프링 부트 : 포트 8444에서 수신 대기하도록 구성된 Tomcat 커넥터를 시작하지 못했습니다.
# Define a custom port instead of the default 8080
server.port = 8444
# Tell Spring Security (if used) to require requests over HTTPS
security.require-ssl=true
# The format used for the keystore
server.ssl.key-store-type:PKCS12
# The path to the keystore containing the certificate
server.ssl.key-store=keystore.p12
# The password used to generate the certificate
server.ssl.key-store-password=<somepassword>
# The alias mapped to the certificate
server.ssl.key-alias=tomcat
지금 : 응용 프로그램은 사전에 지금과 같은 내 application.properties
, 같은 디렉토리에있는 keystore.jks
을 만든 https://localhost:8080
작업을했다 봄 부팅 응용 프로그램, 그것은 던졌습니다 :
Description:
The Tomcat connector configured to listen on port 8444 failed to start. The port may already be in use or the connector may be misconfigured.
Action:
Verify the connector's configuration, identify and stop any process that's listening on port 8444, or configure this application to listen on another port.
포트가 사용되지 않으므로 잘못 구성해야합니까?
변경해야 할 부분이 확실하지 않습니다. 그것은 단순한 SPA 응용 프로그램입니다. Spring은 index.html을 제공하고 하나의 REST 끝점을 가지고 있습니다. 이 경우 https를 받아들이도록 tomcat/spring을 어떻게 구성해야하며 오류없이 시작해야합니까?
'server.ssl.key-store-type' 줄에 작은 유형이 있습니다. 'yml'은':'를 사용합니다. '{file} .properties'는'= ' – oak
을 사용하고 디버그 플래그로 실행을 시도합니다. 일부 숨겨진 오류를 찾는 데 도움이 될 수 있습니다. – oak
동일한 문제가 너무 있습니다. 해결책을 찾았습니까 – Johna