私はMavenizedプロジェクト(Webアプリケーション)を使用しており、SpringBootを使用してパッケージ化して実行しています。私はそれを戦争としてパッケージ化し、spring-boot:run
の目標を使用して起動します。 アプリケーションは、証明書を必要とする第三者ベンダーのRESTful APIをいくつか呼び出します。 ベンダーのファイルcacert
があります。私のローカルホストでは、私のファイルシステムにcertファイルを保存しておいて、SpringBootの起動時にjavax.net.ssl.trustStore
コマンドライン引数を使って参照しています[javax.net.ssl.trustStore=<path to cacert file on my file system>
] これでcacertファイルをクラスパスに保存することにしましたsrc/main/resourcesの下にいくつかのフォルダがあります)。 私はSpringBootに起動時にこのリソースをロードし、システムプロパティを使用して参照します。 私はそれをどうやって行うことができますか?ここでSpringBootの起動時に認証ファイルを参照する方法
0
A
答えて
0
SSLプロパティのリストは、(application.propertiesファイルにこれらを追加)です。
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
関連する問題
- 1. 起動時のSilverlight認証 - 同期動作を模倣する方法?
- 2. 実行時にJarファイルの場所を参照する方法
- 3. firebaseベースのエラー起動時の認証):
- 4. 認証エラー後にweblogicサーバを再起動する方法
- 5. Web参照によるHTTP認証
- 6. 起動時にrunniingするファイルからファイルを開く方法
- 7. アプリケーション起動時に認証ポップアップを取得する
- 8. SpringBoot Rest APIカスタム認証
- 9. Windows 10の起動時にEclipseを起動する方法
- 10. Laravel 5.2デフォルト認証、認証時に登録する方法
- 11. アプリ起動時のバンドルファイル参照/パスの取得
- 12. Android 2.2:起動時に自動的に起動する方法と、別のアプリを起動させる方法
- 13. マングースで、他のモデルの参照を持つモデルを起動する方法
- 14. SpringBoot、ldifを使用せずにLDAPで認証する方法は?
- 15. iPhone起動時にアプリケーションを起動する方法
- 16. 起動時にサービス( `IServiceCollection`)を起動する方法
- 17. apache karafで起動時にバンドルを起動する方法
- 18. 起動時にplackアプリケーションを起動する方法
- 19. 起動時に "unbound"を起動する方法
- 20. アプリ全体でユーザーと認証参照を共有する有効な方法
- 21. WCFサービス参照でHTTP認証資格情報を送信する方法
- 22. SpringBoot-アプリケーション起動時にテーブルが作成されない
- 23. 挿入時に別のコレクションを参照する方法は?
- 24. 実行時にクラスパスから設定ファイルを参照する方法(IDEで)
- 25. アプリケーション起動時に起動するQTMovieファイルを保存する
- 26. emacs/spacemacsの起動時にシェルバッファを自動的に起動する方法
- 27. PCの再起動時にWindowsデバイスの状態を確認する方法は?
- 28. JavaFX 8:起動時に自動的にファイルを入力する方法は?
- 29. クラッシュ時にjarファイルを自動的に再起動する方法
- 30. シェルプログラムのサブディレクトリにあるファイルを参照する方法は?