Reloading the static files in Spark/Jetty-server

这一生的挚爱 提交于 2019-12-01 16:46:40

问题


I have a bit similar problem described here:

Refresh static files served by SparkJava

In my application user can upload the content to one folder that is also served to user with

Spark.staticFileLocation("/public");

feature. I've understood that SparkJava is reading the 'static' content from that folder only once at startup and it is not aware of changes there. Is it possible to ask Spark (or Jetty via Spark) to reload the changes in static folder?


回答1:


Move to externalStaticFileLocation("/var/www/public");



来源:https://stackoverflow.com/questions/34358437/reloading-the-static-files-in-spark-jetty-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!