Reloading the static files in Spark/Jetty-server

2019-02-22 02:55发布

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条回答
虎瘦雄心在
2楼-- · 2019-02-22 03:13

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

查看更多
登录 后发表回答