【发布时间】:2017-02-21 20:48:14
【问题描述】:
我是 Spring 新手,我发现很难进入它。我想提供静态 index.html 但它不起作用。
我使用了this 教程,但无法通过以下方式访问 index.html: http://localhost:8080/ 或 http://localhost:8080/src/main/public/index.html
IndexHtmlController:
package de.phip1611.springboot_test_1;
import org.springframework.stereotype.Controller;
@Controller
public class IndexHtmlController {}
// due to https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot
// this should be enough..
【问题讨论】:
-
server.contextPath属性的值是多少? -
那是什么?未设置
标签: java spring spring-mvc