1) controller에 mapping 되어 있는 경우 : templates 폴더에 있어야 해
2) /xxx.html 이렇게 칙접 html을 친다면 : static 폴더에 있어야해
3) 실험
- (1) static 폴더에 bye.html 있는 경우
- (~/bye.html)
이런식으로 url에서 직접 접근 가능
- static 폴더에 있는 html은 url로 직접 연결 가능
- templates폴더로 옮기면 직접 접근(localhost:8080/bye.html) 가능할까?
- nope. templates에있으면 url 직접 연결 불가능. (controller 없을 때)
@GetMapping("bye")
public String bye(Model model){
model.addAttribute("data", "hello!");
return "bye";
}
ls -arlth 모든 파일, 폴더를 시간 역순으로 출력 https://www.inflearn.com/questions/53961<>
.jar 자바 프로젝트 압축파일
데이터 h2 연동부터 막혀서 인프런 강의 <스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술> 을 들었다. 주말에 공부를 더 할 수 있는 방법을 찾아야지