問題タブ [springjunit4classrunner]
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.
java - @RunWith(SpringJUnit4ClassRunner.class) を使用したプロファイル
インジェクション用に異なる Bean を提供する TestSuite の構成が 2 つあります。これは、プロファイルに注釈を設定している限り機能します。
@ActiveProfiles( profiles={"a"})
と@ActiveProfiles( profiles={"b"})
しかし、プロパティソースファイルから設定できないようです
私の注釈は次のようになります
そして内容はapplication.properties
、
そして、満たされていない依存関係が生じます
前述のように@ActiveProfiles
、上記の設定が機能し、正しいものが使用されます。
PropertySource および/または TestPropertySource が機能しないかのようです@RunWith(SpringJUnit4ClassRunner.class)
spring-boot - spring-integration-file の junit テスト ケース
春の初心者です。spring-integration-file (spring boot-FTP、SFTP、NFS) を使用して作成された spring プロジェクトがあり、ファイルをソース パスから宛先パスに変換します。
プロジェクトをテストするには、junit テスト ケースを作成する必要があります。spring-integration-file プロジェクトの @RunWith(SpringRunner.class) を使用して junit テストケースを作成するためのドキュメント/リンクを誰かが共有すると役立ちます。
前もって感謝します