Commit bee97cdb authored by Piotr Gawron's avatar Piotr Gawron
Browse files

handle index.html properly

parent 40099483
...@@ -34,6 +34,9 @@ public class DocsController extends BaseController { ...@@ -34,6 +34,9 @@ public class DocsController extends BaseController {
@GetMapping(value = "/{page:.+}") @GetMapping(value = "/{page:.+}")
public byte[] getTaxonomy(@PathVariable String page) throws ObjectNotFoundException, IOException { public byte[] getTaxonomy(@PathVariable String page) throws ObjectNotFoundException, IOException {
if (page == null || page.isEmpty()) {
page = "index.html";
}
File file = new File(context.getRealPath("/docs/" + page)); File file = new File(context.getRealPath("/docs/" + page));
if (file.exists()) { if (file.exists()) {
String content = FileUtils.readFileToString(file, StandardCharsets.UTF_8); String content = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment