Spring Applications
Exercise: Todo REST Features
- Add the Jackson libraries
tools.jackson.dataformat:jackson-dataformat-xml as Maven dependency to the REST service.
- Implement a message converter
TodoCsvMessageConverter that can write a todo list in CSV format and expand the controller annotations such that a todo list can be exported as XML or CSV.
- Implement a filter
LoggingFilter that extends the HttpFilter class and logs the HTTP requests and responses.
- Add the
spring-boot-starter-validation Maven dependency and provide Bean Validation constraints such that identifiers must be positive, todos must have a non-empty title and due dates are in the present or future.
- Add the SpringDoc library as Maven dependency and Swagger annotations to the controller, and review the generated OpenAPI documentation.
Solution