Fix deprecations
- Due to switch to boot 2.4.x, fixing various deprecations where things mostly come from reactor.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2019 the original author or authors.
|
||||
* Copyright 2015-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -66,12 +66,12 @@ public class Persist {
|
||||
|
||||
//tag::snippetB[]
|
||||
public void change(int order, String event) {
|
||||
Order o = jdbcTemplate.queryForObject("select id, state from orders where id = ?", new Object[] { order },
|
||||
Order o = jdbcTemplate.queryForObject("select id, state from orders where id = ?",
|
||||
new RowMapper<Order>() {
|
||||
public Order mapRow(ResultSet rs, int rowNum) throws SQLException {
|
||||
return new Order(rs.getInt("id"), rs.getString("state"));
|
||||
}
|
||||
});
|
||||
}, new Object[] { order });
|
||||
handler.handleEventWithStateReactively(MessageBuilder
|
||||
.withPayload(event).setHeader("order", order).build(), o.state)
|
||||
.subscribe();
|
||||
|
||||
Reference in New Issue
Block a user