• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 Spring 게시판 can not resolve MVC view html 문제

can not resolve MVC view html 문제

2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 글쓴이
  • #128310

    qkqrlarnt
    참가자
    컨트롤러에서 return "index.html"; 에 제목과 같은 문구가 뜹니다
    
    
    import org.springframework.stereotype.Controller;
    import org.springframework.web.bind.annotation.GetMapping;
    @Controller
    public class BasicController {
        @GetMapping("/")
        public String hello() {
            return "index.html";
        }
    }
    
    1. Thymeleaf 제거 후 다시 추가 
    2. static / tamplates 경로 확인 
    3. sdk 버전, 자바 버전 확인 
    4, 프로젝트 초기화
    5. 리빌드 
    6. application.properties에서 기본 경로 수정 등등 해보았으나 해결되지 않습니다... 이유가 뭘까요
    참고로 templeates 경로에 넣고 return "index.html" 대신 return "index" 하면 저 문구가 사라집니다
    #128325

    codingapple
    키 마스터
    templates 폴더 스펠링 맞는지 @GetMapping("/") 이런거 하나 더있는건 아닌지 확인해봅시다
    브라우저에선 잘보이면 상관없습니다
2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠