Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- springboot
- Windows
- Spring
- VSCode
- log4j2
- maven
- dbeaver
- LOG4J
- JPA
- tibero
- Kubernetes
- kubectl
- BPMN
- JavaScript
- Java
- nginx
- useEffect
- Git
- react
- nodejs
- intellijIDEA
- NCP
- mybatis
- IntelliJ
- gradle
- wildfly
- database
- gson
- MySQL
- docker
Archives
- Today
- Total
두 손끝의 창조자
ThymeleafViewResolver 설정시 유의점 본문
Thymeleaf 홈페이지에 Spring과 연동하는 소스를 가져와서 테스트 했는데 아무리 해도 뷰가 매핑이 되지 않았다.
몇 시간 헤매다가 아래 구문에서 문제가 있었다.
viewResolver.setViewNames(new String[]{".html", ".xhtml"});
당연하게도 xxx.html 파일과 매핑을 위한 설정정보라고 생각했는데 Controller에서 반환한 뷰 이름과 패턴 매치해볼 대상들이었다.
컨트롤러에서 뷰 이름만 리턴했으니 .html 과 같은 것이 매치가 될 리가 없다.
무슨 샘플 소스를 이따구로...
https://www.thymeleaf.org/doc/tutorials/3.0/thymeleafspring.html
반응형
Comments