問題タブ [openfeign]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
spring - @RestClientTest および @FeignAutoConfiguration を使用した Spring テストが機能しない
私は次の構成を持っています:
そして、次のテストを行います。
私が得るエラーはCaused by: com.netflix.client.ClientException: Load balancer does not have available server for client: theclient
、まるでapplication.yaml
が読まれていないかのようです。ただし、 を含むconfig.properties
ファイルを追加するtheclient.ribbon.listOfServers=http://server:8080
と、テストは機能し、合格します。
@TestPropertySource("classpath:application.yaml")
ログに表示されますpropertySourceLocations = '{classpath:application.yaml}'
が、同じエラーが発生します。
また、次を追加して、リボンを無効にしようとしました。
しかし、うまくいきません。
ご意見とご協力に感謝いたします。
spring-boot - 現在廃止されている OAuth2FeignRequestInterceptor の代替
以前の実装では、OAuth2FeignRequestInterceptor を使用していました。しかし、Spring セキュリティ 5 以降では、OAuth2FeignRequestInterceptor は非推奨になったようです。同じことを達成するための代替手段は何ですか?. たくさんのブログやスレッドを検索しましたが、答えが見つかりませんでした。