Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/artembilan/si-http-download-excel-sample

Demostates HTTP-download XLS File as byte[] using Spring Integration
https://github.com/artembilan/si-http-download-excel-sample

Last synced: 17 days ago
JSON representation

Demostates HTTP-download XLS File as byte[] using Spring Integration

Awesome Lists containing this project

README

        

Sample demonstrates Web Application with one functionality:
Excel file downloading as byte[] and 'Content-Type' HTTP Response header with value 'application/vnd.ms-excel'.
Server logic built on Spring Integration:
1. File is read from Classpath via org.springframework.core.io.ClassPathResource
2. Converted into byte[] via org.apache.commons.io.IOUtils
3. byte[] is placed as Message payload via inside the
4. 'Content-Type' is added into MessageHeaders via
5. HttpRequest is processed by

Build System is Gradle and applies 'jetty' plugin
To test this sample it is enough to run Gradle task 'jettyRunWar'.
Jetty Servlet-Container will be started on default port 8080.
Application context-root is the same a project name.

Important: only Microsoft IE can open Excel sheet immediately in the Browser window