Spring Applications
Exercise: Todo REST Features
- Add the Jackson library
com.fasterxml.jackson.dataformat:jackson-dataformat-xml
as dependency such that XML is a supported data format.
- Implement and register a message converter
TodoCSVMessageConverter
that can produce a todo list in CSV format.
- Implement a filter
LoggingFilter
that extends the HttpFilter class and logs the HTTP requests and responses, and register the filter.
- 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 future.
- Add the SpringDoc library as Maven dependency and verify the generated OpenAPI documentation.
Solution