Where to put static files for Spark Web Framework?

前端 未结 4 906
予麋鹿
予麋鹿 2020-12-08 07:21

Where do I put files when trying to serve static files with the Spark web framework?

I haven\'t been able to find anything online - I\'m beginning to suspect I don\'

4条回答
  •  盖世英雄少女心
    2020-12-08 08:01

    1. Place your public directory into src/main/resources
    2. Replace Spark.staticFileLocation("/public"); to Spark.staticFileLocation("public");

提交回复
热议问题