강의

멘토링

로드맵

Inflearn Community Q&A

drcho100875's profile image
drcho100875

asked

Spring MVC Part 1 - Core technologies for backend web development

Create Project

index.html 말고 다른 html파일을 처음에 보여주도록 할 수 있나요?

Written on

·

801

0

강의에서는 localhost:8080을 입력했을때
index.html이 출력되는데 혹시 여러 html파일들이 있을 경우
localhost:8080으로 입력했을때 다른 html 화면이 출력되려면 어떻게 해야 할까요?

MVCspring

Quiz

When creating dynamic web pages with Spring MVC, what are the key dependency combinations needed for basic web features and HTML template processing? The key dependencies typically include: * `spring-boot-starter-web` (for core web capabilities) * A template engine starter like `spring-boot-starter-thymeleaf` (for HTML templating)

Web, H2

Web, Thymeleaf

JPA, Lombok

Test, Web

Answer 1

1

안녕하세요. Cho Seong Yong님, 공식 서포터즈 OMG입니다.

아래와 같이 루트 요청에 대하여 새로운 페이지로 이동하도록 설정할 수 있습니다.

"newPage"에는 이동할 html 명을 작성해주세요

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


감사합니다.

Cho Seong Yong님의 프로필 이미지
Cho Seong Yong
Questioner

알려주셔서 감사합니다!

drcho100875's profile image
drcho100875

asked

Ask a question