Skip to main content

Command Palette

Search for a command to run...

How to address Spring Boot + Thymeleaf : 'Cannot resolve symbol' in template in IntelliJ IDEA

Published
β€’1 min read
How to address Spring Boot + Thymeleaf : 'Cannot resolve symbol' in template in IntelliJ IDEA
A

I am learning development to build things I only imagine.

Currently working with Angular, NestJS, MongoDB.

The title describes the problem pretty much... In Spring Boot, when using Thymeleaf as template engine, the referenced variables in the template are marked as errors in the IntelliJ IDEA's Problem Pane. Below is a screenshot of the case:

Screen Shot 2022-02-21 at 3.20.51 PM.png

Screen Shot 2022-02-21 at 3.21.02 PM.png

When compiled, the template displays alright despite the problems. But it doesn't feel right to leave the reported problems in there. How can I address these unresolved symbols in the template?

The solution is quite easy. (Found the solution here - StackOverflow).

SOLUTION: Replace

<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

with

<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://thymeleaf.org">

The only difference is in the namespace - just removing that 'www' infix.

Why does it do the trick? I haven't figured it out but it works and the cause is low in priority for me... and I just wanted to leave a note for myself and for anyone interested in addressing the issue.

Happy Coding!

More from this blog

πŸš€ νŠœν† λ¦¬μ–Ό: 5λΆ„ λ§Œμ— 빈 ν™”λ©΄μ—μ„œ μ•± λ°°ν¬κΉŒμ§€ (ai μ—μ΄μ „νŠΈ μŠ€νƒ)

GitHub Codespaces λ₯Ό μ‚¬μš©ν•˜λ©΄ 둜컬 λ¨Έμ‹ μ—μ„œ μ•„λ¬΄λŸ° μ„€μΉ˜λ₯Ό ν•˜μ§€ μ•Šκ³ λ„ κ°œλ°œμ„ ν•  수 μžˆλ‹€λŠ” 것을 μ΅œκ·Όμ— μ•Œκ²Œ λ˜μ—ˆμŠ΅λ‹ˆλ‹€. 또, claude code λ₯Ό μ“°λ©΄ μ½”λ”© μ—μ΄μ „νŠΈκ°€ ν”„λ‘¬ν”„νŠΈμ— λ§žμΆ”μ–΄μ„œ νŒŒμΌμ„ 직접 생성/μˆ˜μ •ν•˜κ³  코딩을 ν•΄ μ€€λ‹€λŠ” 것을 μ•Œκ²Œ λ˜μ—ˆμŠ΅λ‹ˆλ‹€. λ§Œμ•½ 이 두가지λ₯Ό κ²°ν•©ν•˜λ©΄ μ–΄λ–¨κΉŒ ν•˜λŠ” 생각이 λ“€μ–΄μ„œ 이 μŠ€νƒμ΄ μž‘λ™ν• μ§€ ν…ŒμŠ€νŠΈλ₯Ό ν•΄ λ³΄μ•˜μŠ΅λ‹ˆλ‹€. 개발자 κ²½ν—˜μ΄ λ„ˆλ¬΄ ν›Œλ₯­ν•˜κΈ° λ•Œλ¬Έμ—, ν•΄λ‹Ή 과정을 μ•„λž˜μ™€ 같이 μ •λ¦¬ν–ˆμŠ΅λ‹ˆ...

Jan 8, 20262 min read

κ³ μ • IP 둜 인터넷에 μ—°κ²°λœ ν™˜κ²½μ—μ„œ VMWare - Ubuntu 20.04 μ»¨ν…Œμ΄λ„ˆλ₯Ό 인터넷에 μ—°κ²°μ‹œν‚€

μ‚¬μš© ν™˜κ²½ : VMWare Fusion 12.2.4 ν˜„μž¬ κ³ μ • IP λ₯Ό 톡해 μ™ΈλΆ€λ‘œ 인터넷을 μ ‘μ†ν•˜λŠ” λ„€νŠΈμ›Œν¬ ν™˜κ²½μž…λ‹ˆλ‹€. 이 λ•Œμ— VMWare 둜 Ubuntu 20.04 이미지λ₯Ό μ„€μΉ˜ν•˜λ‹ˆ λ°”λ‘œ 인터넷 연결이 λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. 이럴 λ•Œμ— 인터넷 연결을 ν•˜λŠ” λ°©λ²•μž…λ‹ˆλ‹€. (Credit: https://www.youtube.com/watch?v=69jZUccRbik) VM instance 의 Network Adaptor λ₯Ό NAT 둜 μ„€μ •ν•©λ‹ˆλ‹€....

Nov 4, 20222 min read

Andrew Kim's Blog

18 posts