Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 8 days ago
JSON representation
Demostates HTTP-download XLS File as byte[] using Spring Integration
- Host: GitHub
- URL: https://github.com/artembilan/si-http-download-excel-sample
- Owner: artembilan
- Created: 2012-05-25T10:07:54.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-05-25T10:45:45.000Z (over 12 years ago)
- Last Synced: 2024-10-28T19:46:25.888Z (about 2 months ago)
- Language: Groovy
- Size: 130 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
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 byBuild 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