1
스프링 부트 응용 프로그램에서 index.html을 시작하려고하지만 404가 표시됩니다. 어떤 종속성이 있습니까?스프링 부트가 정적 웹 컨텐츠를 시작하지 않음
build.gradle (멀티 프로젝트)
project('sub-project')
{
apply plugin: 'spring-boot'
compile (
"org.springframework.boot:spring-boot-starter-web:1.0.0.RC5",
"org.springframework.boot:spring-boot-starter-actuator:1.0.0.RC5"
.. few more app specific dependencies
)
프로젝트 구조 :
MainProject -- sub-project src main resources index.html
Application 클래스 : 근본 원인을 찾을 수
@Configuration
@EnableAutoConfiguration
class Application {
public static void main(String[] args) {
SpringApplication.run([SpringServlet, Application, "classpath:/META-INF/com/my/package/bootstrap.xml"] as Object[], args)
}
}
**Launching http://localhost:8080/index.html throws 404.**
내 대답을 삭제하고 당신을 업 그레 이드 –