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: 17 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: 2023-03-24T00:55:32.303Z (over 1 year ago)
- Language: Groovy
- Size: 130 KB
- Stars: 4
- Watchers: 1
- 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