Springboot + thymeleaf 搭建问题

Error resolving template [/index], template might not exist or might not be accessible by any of the configured Template Resolvers

在查找大部分资料以后,该方面问题解决方案参差不齐且杂乱。在尝试诸多方法之后我发现,我的问题出现在template的资源识别

<build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                    <includes>
                        <include>**/*.*</include>   //问题解决
                        <include>**/*.properties</include>
                        <include>**/*.xml</include>
                        <include>**/*.yml</include>
                    </includes>
            </resource>
        </resources>
</build>

我的问题在于没有正确配置resources文件导致无法识别templates 可在下添加*/.*以识别resource文件夹下的所有资源配置

感谢大佬fengzyf的csdn blog 的解决方案。

posted @ 2024-09-12 11:30:22 solity_top 阅读(5) 评论(0)
发表评论
昵称
邮箱
网址