Почему SpringBoot Не отображает шаблоны FreeMarker

Есть контроллер

package ru.shevchenkov.docsite.controllers;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class DocumentController {

    @GetMapping("/")
    public String getDocuments(){
        return "documents";
    }



}

Есть вьюшка

<!DOCKTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <h1>Hello</h1>
</body>
</html>

Сервер пишет

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Thu Feb 06 13:16:58 VLAT 2020
There was an unexpected error (type=Not Found, status=404).
No message available

Проблема в том что Spring не находит ни файлы формата FTL (Freemarker) ни обычные HTML файлы. Имена файлов совпадают


Ответы (1 шт):

Автор решения: ArkaDioZ

Сталкивался с подобной проблемой. Как вариант нужно проверить в maven наличие зависимости Apache FreeMarker ( ссылка на нее ).

→ Ссылка