Fixed the build

This commit is contained in:
Marcin Grzejszczak
2019-04-26 16:32:31 +04:00
parent 81c6560180
commit 2475abfa8b
6 changed files with 55 additions and 31 deletions

View File

@@ -61,14 +61,22 @@ public class RabbitManager {
this.rabbitTemplate = rabbitTemplate;
}
@RabbitListener(bindings = @QueueBinding(value = @Queue, exchange = @Exchange(value = "input", durable = "true", autoDelete = "false", type = "topic"), key = "event"))
@RabbitListener(
bindings = @QueueBinding(
value = @Queue, exchange = @Exchange(value = "input",
durable = "true", autoDelete = "false", type = "topic"),
key = "event"))
public void newBook(Book book, @Headers Map<String, String> headers) {
LOG.info("Received new book with bookname = " + book.getName());
LOG.info("Headers = " + headers);
this.service.sendBook(book, headers.get("amqp_replyTo"));
}
@RabbitListener(bindings = @QueueBinding(value = @Queue, exchange = @Exchange(value = "input", durable = "true", autoDelete = "false", type = "topic"), key = "event2"))
@RabbitListener(
bindings = @QueueBinding(
value = @Queue, exchange = @Exchange(value = "input",
durable = "true", autoDelete = "false", type = "topic"),
key = "event2"))
public void newBook2(Book book, @Headers Map<String, String> headers) {
LOG.info("newBook2 Received new book with bookname = " + book.getName());
LOG.info("newBook2 Headers = " + headers);

View File

@@ -31,7 +31,9 @@ public class MessageSubscriberRabbitListener {
private Person person;
// tag::amqp_annotated_listener[]
@RabbitListener(bindings = @QueueBinding(value = @Queue("test.queue"), exchange = @Exchange(value = "contract-test.exchange", ignoreDeclarationExceptions = "true")))
@RabbitListener(bindings = @QueueBinding(value = @Queue("test.queue"),
exchange = @Exchange(value = "contract-test.exchange",
ignoreDeclarationExceptions = "true")))
public void handlePerson(Person person) {
this.person = person;
}

View File

@@ -40,7 +40,8 @@ import static org.assertj.core.api.Assertions.assertThat;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@AutoConfigureStubRunner(repositoryRoot = "classpath:m2repo/repository/", ids = {
"org.springframework.cloud.contract.verifier.stubs:contextPathFraudDetectionServer" }, stubsMode = StubRunnerProperties.StubsMode.REMOTE)
"org.springframework.cloud.contract.verifier.stubs:contextPathFraudDetectionServer" },
stubsMode = StubRunnerProperties.StubsMode.REMOTE)
public class LoanApplicationServiceTests {
// end::autoconfigure_stubrunner[]