본문 바로가기
수업정리/Thymeleaf

[06/14 오전수업]Thymeleaf 들어가기

by WWIT 2021. 6. 14.

 

 

 

 

 

장점

  • 텍스트는 지우지않고 얹기만 하면됌
  • 협업을하기위에서는 좋은 방법이다.

 



 

연산자

삼항연산자


확장자>>properties로 설정

properties : 자식, 내가 원하는 파일을 외부에 저장

$ >> model을 꺼내서 쓰는것

# >>>*메세지에서 불러온 내용

 

메세지 ==외부파일

 


 

 

 

여러가지 문서를 만드는 목적으로 사용되기도 함

ctx라는 저장소가 있음>>>거기다가 담았다가 꺼내 쓸수도있음(꺼내쓸때 get으로)

 

 

 

https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#a-menu-for-our-home-page

 

Tutorial: Using Thymeleaf

1 Introducing Thymeleaf 1.1 What is Thymeleaf? Thymeleaf is a modern server-side Java template engine for both web and standalone environments, capable of processing HTML, XML, JavaScript, CSS and even plain text. The main goal of Thymeleaf is to provide a

www.thymeleaf.org

 


Using th:each

 

설정

결과화면

장점 : 기존데이터(원문)을 건들지 않고 수정가능

 


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


오늘 오류

 

 

MemberController 클래스가 2개여서 중복되어서 나는 오류임

MemberController가 2개여서 하나 @Controller("member")로 수정해줬더니 오류해결