스프링 클라우드 컨트랙트 공식 레퍼런스를 한글로 번역한 문서입니다.
전체 목차는 여기에 있습니다.
기본적으로 Stub Runner는 스텁stub을 찾지 못하면 실패한다. 이 동작을 변경하고 싶다면, 어노테이션 내 failOnNoStubs
프로퍼티를 false
로 설정하거나, JUnit Rule 또는 Extension에서 withFailOnNoStubs(false)
메소드를 호출해라. 예제는 다음을 참고해라:
Annotation
JUnit 4 Rule
JUnit 5 Extension
@AutoConfigureStubRunner(
stubsMode = StubRunnerProperties.StubsMode.REMOTE,
repositoryRoot = "stubs://file://location/to/the/contracts",
ids = "com.example:some-producer",
failOnNoStubs = false)
@Rule
public StubRunnerRule rule = new StubRunnerRule()
.downloadStub("com.example:some-producer")
.repoRoot("stubs://file://location/to/the/contracts")
.stubsMode(StubRunnerProperties.StubsMode.REMOTE)
.withFailOnNoStubs(false);
@RegisterExtension
public StubRunnerExtension stubRunnerExtension = new StubRunnerExtension()
.downloadStub("com.example:some-producer")
.repoRoot("stubs://file://location/to/the/contracts")
.stubsMode(StubRunnerProperties.StubsMode.REMOTE)
.withFailOnNoStubs(false);
Next :
3.6.11. Common Properties
스텁 러너의 공통 프로퍼티들
전체 목차는 여기에 있습니다.