강의

멘토링

커뮤니티

Inflearn Community Q&A

No author

This post's author information has been deleted.

Real-world! Spring Boot and JPA Utilization 1 - Web Application Development

View Settings

static/index.html 은 Mapping을 안해줬는데도 되는 이유가 무엇인가요 ?

Written on

·

1.2K

0

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

 

 

이런 소스 없이 자동으로 localhost:8080 들어가면 Index.html로 연결되는 이유가 무엇일까요?

javaspring웹앱spring-bootjpa

Answer 1

0

안녕하세요, hjemsti 님! 공식 서포터즈 codesweaver 입니다.

스프링 부트 실행 로그를 살펴보시면 welcome page 관련 항목이 있을을 확인하실 수 있습니다. (이 로그는 static/index.html 파일이 있을때 확인하실 수 있습니다) 이는 스프링 부트가 기본적으로 index 화면을 미리 매핑하기 떄문입니다. 이 웰컴페이지는 사용자가 임의로 변경할 수도 있습니다 :)

감사합니다.

No author

This post's author information has been deleted.

Ask a question