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