2016-11-07 2 views
0

Mavenized 프로젝트 (웹 응용 프로그램)가 있고 SpringBoot를 사용하여 패키지하고 실행합니다. 나는 그것을 전쟁으로 포장 한 다음 spring-boot:run 목표를 사용하여 시작합니다. 응용 프로그램은 인증서가 필요한 타사 공급 업체의 RESTful API를 소수만 호출합니다. 나는 벤더의 파일 cacert을 가지고 있습니다. 내 localhost에 대해 certfile을 내 파일 시스템에 보관하고 SpringBoot 실행 중에 javax.net.ssl.trustStore 명령 줄 인수를 사용하여 참조했습니다. [그래서 다음과 같이 입력하십시오. javax.net.ssl.trustStore=<path to cacert file on my file system>] 이제 클래스 경로에 cacert 파일을 보관하기로했습니다. src/main/resources 아래의 일부 폴더). SpringBoot가 시동시이 리소스를로드하고 시스템 속성 javax.net.ssl.trustStore을 사용하여 참조하도록합니다. 누군가 어떻게 도와 줄 수 있습니까? 참조, SpringBoot 시작시 인증 파일을 참조하는 방법

server.ssl.ciphers= # Supported SSL ciphers. 
server.ssl.client-auth= # Whether client authentication is wanted ("want") or needed ("need"). Requires a trust store. 
server.ssl.enabled= # Enable SSL support. 
server.ssl.enabled-protocols= # Enabled SSL protocols. 
server.ssl.key-alias= # Alias that identifies the key in the key store. 
server.ssl.key-password= # Password used to access the key in the key store. 
server.ssl.key-store= # Path to the key store that holds the SSL certificate (typically a jks file). 
server.ssl.key-store-password= # Password used to access the key store. 
server.ssl.key-store-provider= # Provider for the key store. 
server.ssl.key-store-type= # Type of the key store. 
server.ssl.protocol=TLS # SSL protocol to use. 
server.ssl.trust-store= # Trust store that holds SSL certificates. 
server.ssl.trust-store-password= # Password used to access the trust store. 
server.ssl.trust-store-provider= # Provider for the trust store. 
server.ssl.trust-store-type= # Type of the trust store. 

가 도움이 희망 : http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html

다음

답변

0

는 SSL 속성의 목록 (application.properties 파일에 추가 할)입니다
관련 문제