【发布时间】:2015-08-03 22:34:48
【问题描述】:
我有一个带有 gradle build 的 spring boot 应用程序。
我在 main/resources 下有 static/index.html。当服务器启动时,尝试访问 index.html 返回 404,抱怨找不到 URI 的映射。
有什么见解吗?
【问题讨论】:
标签: angularjs gradle spring-boot
我有一个带有 gradle build 的 spring boot 应用程序。
我在 main/resources 下有 static/index.html。当服务器启动时,尝试访问 index.html 返回 404,抱怨找不到 URI 的映射。
有什么见解吗?
【问题讨论】:
标签: angularjs gradle spring-boot
如果您在main/resources 中有静态资源,那么它们位于错误的位置。它们应该在src/main/resources 中,即您的index.html 文件的路径应该是src/main/resources/static/index.html。
【讨论】: