git checkout demo-start
- Maven project, Lombok
- Spring 3.2, JavaConfig, Servlet 3
- Order slice, payment slice
- Show
Order
class,OrderRepository
- Show integration test
- Show
@EnableJpaRepositories
- Explain proxy-mechanism, CRUD, finder methods, IDE support
- Show
WebApplicationInitializer
,RepositoryRestMvcConfiguration
- Bootstrap app via
mvn jetty:run
- Show resource exported, navigate to orders, show finder method execution:
http://localhost:8080/orders/search/findByStatus?status=PAYMENT_EXPECTED
- Note: future enhancement - link templates
- Show
http://localhost:8080/orders/schema
- Enable
CoreOrderResourceProcessor
- Enable
OrderControllerEventListener
- Show
cancel
andupdate
links are added, explainDELETE
gets prevented
- Explain
PaymentService
- Explain
PaymentController
(esp.submitPayment(…)
) - Hook link into
Order
resource ifOrder
is inPAYMENT_EXPECTED
state - Show
PaymentOrderResourceProcessor
- Integration tests required Servlet container running
- Spring 3.2 introduced MVC test framework (mocks for
ServletContext
,HttpServletRequest
,…Response
) - Show
PaymentProcessIntegrationTest.beforeClass(…)
- Walk through
processNewOrder(…)