Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 百里香叶+;弹簧安全性->#身份验证在链接位置与其他位置组合时不起作用_Java_Spring_Spring Security_Thymeleaf - Fatal编程技术网

Java 百里香叶+;弹簧安全性->#身份验证在链接位置与其他位置组合时不起作用

Java 百里香叶+;弹簧安全性->#身份验证在链接位置与其他位置组合时不起作用,java,spring,spring-security,thymeleaf,Java,Spring,Spring Security,Thymeleaf,我试图在链接(@{})中使用符号${{{#authentication.systemUser.tenant.url})。当我尝试在文本位置(${})中执行相同操作时,这种用法对我有效 我的代码: <strong th:text="${#authentication.systemUser.name}" /> <a th:href="@{/${#authentication.systemUser.tenant.url}/user}" > <i class="

我试图在链接(
@{}
)中使用符号
${{{#authentication.systemUser.tenant.url}
)。当我尝试在文本位置(
${}
)中执行相同操作时,这种用法对我有效

我的代码:

<strong th:text="${#authentication.systemUser.name}" />
<a th:href="@{/${#authentication.systemUser.tenant.url}/user}" > 
    <i class="fa fa-tachometer"></i>
    <span th:text="#{user.dashboard}" />
</a>
文本位置:

<strong th:text="${#authentication.systemUser.name}" />
<a th:href="@{/${#authentication.systemUser.tenant.url}/user}" > 
    <i class="fa fa-tachometer"></i>
    <span th:text="#{user.dashboard}" />
</a>
在本例中,我在DIV中声明了所有变量,然后在link中使用它


现在生成的链接是:
http://localhost:8080/apolo/user

我认为问题与使用 变量表达式

您可以使用管道
|
执行文字替换()