简体   繁体   中英

PlayFramework 2.X routing to generated content

I have a process within my play app that generates a text file. I would like to copy this text file to a directory where i can then view it from a static route. In production mode, the public assets folder is jar'd up, Is there a directory I can place my files into where I can route to them in prod mode.

Thanks for confirming mz, I ended up rolling my own solution which is hopefully secure.... In my Global application class , I store a file location, which is then accessible by my controllers. The controllers simply read the file(s) into a Buffered REader, then spit them back out. using OK.sendFile(string).

thanks ,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM