lets-blade / blade

:rocket: Lightning fast and elegant mvc framework for Java8

Home Page:https://lets-blade.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blade.Of().showFileList(true) works from IDE, but not from "java -jar"

andrea-ligios opened this issue · comments

Given the code:

Blade.of().showFileList(true).start();

If the project is run from an IDE (in my case Eclipse 2018-09 under Ubuntu 18.04), opening http://localhost:9000/static/ shows the files within the static folder.

If the project is run with java -jar app.jar, it shows an empty page.


BONUS: It might also be an error in the docs, since it says the configuration attribute is mvc.statics.list;

In the code instead, I see mvc.statics.show-list

Cheers

@andrea-ligios Thanks for your feedback, I have not noticed this problem before. In most cases, I packaged it in a directory instead of a separate jar.

This is a bug that occurs only when the resource file is packaged in a jar and accesses a directory, but accessing the files in static dir is fine.

I will fix it : )