为什么图像来源变得未知?

Why image source get unknown?

在下面的代码中,如果条件为真,则运行良好,但如果条件为假,则看起来很奇怪的图像 src...

这是我的代码

<img th:src="${(profileData.profile != null) ? profileData.profile : '../images/users/app-store.png'}" alt="" class="img-responsive profile-photo" />

检查

<img src(unknown) alt="" class="img-responsive profile-photo">

输出

预计

根据https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#conditional-expressions

<img th:src="${(profileData.profile != null)} ? ${profileData.profile} : '../images/users/app-store.png'" alt="" class="img-responsive profile-photo" />

提示:检查初始条件

中的右括号}