Polish docs
This commit is contained in:
@@ -78,6 +78,11 @@ task wrapper(type: Wrapper) {
|
||||
}
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
Replace `1.0.0.BUILD-SNAPSHOT` with a version you want to use.
|
||||
====
|
||||
|
||||
Having a normal project structure you'd build this with command:
|
||||
[source,text,indent=0]
|
||||
----
|
||||
@@ -187,6 +192,11 @@ Here is a typical `pom.xml` file:
|
||||
</project>
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
Replace `1.0.0.BUILD-SNAPSHOT` with a version you want to use.
|
||||
====
|
||||
|
||||
Having a normal project structure you'd build this with command:
|
||||
[source,text,indent=0]
|
||||
----
|
||||
|
||||
@@ -66,14 +66,16 @@ 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}, new RowMapper<Order>() {
|
||||
public Order mapRow(ResultSet rs, int rowNum) throws SQLException {
|
||||
return new Order(rs.getInt("id"), rs.getString("state"));
|
||||
}
|
||||
});
|
||||
Order o = jdbcTemplate.queryForObject("select id, state from orders where id = ?", new Object[] { order },
|
||||
new RowMapper<Order>() {
|
||||
public Order mapRow(ResultSet rs, int rowNum) throws SQLException {
|
||||
return new Order(rs.getInt("id"), rs.getString("state"));
|
||||
}
|
||||
});
|
||||
handler.handleEventWithState(MessageBuilder.withPayload(event).setHeader("order", order).build(), o.state);
|
||||
}
|
||||
//end::snippetB[]
|
||||
|
||||
//end::snippetB[]
|
||||
|
||||
//tag::snippetC[]
|
||||
private class LocalPersistStateChangeListener implements PersistStateChangeListener {
|
||||
|
||||
@@ -64,7 +64,7 @@ public class Application {
|
||||
.event(Events.DRY)
|
||||
.and()
|
||||
.withExternal()
|
||||
.source(States.RUNNING) .target(States.POWEROFF)
|
||||
.source(States.RUNNING).target(States.POWEROFF)
|
||||
.event(Events.CUTPOWER)
|
||||
.and()
|
||||
.withExternal()
|
||||
|
||||
Reference in New Issue
Block a user