第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

如何解決這個(gè)問(wèn)題:評(píng)估 SpringEL 表達(dá)式的異常

如何解決這個(gè)問(wèn)題:評(píng)估 SpringEL 表達(dá)式的異常

慕桂英546537 2021-11-11 17:42:10
我正在開發(fā)實(shí)現(xiàn) spring 安全性的簡(jiǎn)單項(xiàng)目。當(dāng)我嘗試使用Spring和Thymeleaf 的注銷鏈接時(shí),問(wèn)題就出現(xiàn)了。1.pom.xml    <!--Spring Boot Dependencies  - Security -->    <dependency>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-security</artifactId>    </dependency>    <!-- Dependencies Spring Security-->    <dependency>        <groupId>org.thymeleaf.extras</groupId>        <artifactId>thymeleaf-extras-springsecurity4</artifactId>        <version>2.1.2.RELEASE</version>        <scope>compile</scope>    </dependency>導(dǎo)航欄.html<ul class="nav navbar-nav navbar-right">                <!--<li><a th:href="@{/login}" th:text="#{navbar.login.text}"></a></li>-->                <li th:if="${#authorization.expression('isAuthenticated()')}">                    <a th:href="@{/login}" th:text="#{navbar.login.text}"/>                </li>                <li th:if="${#authorization.expression('isAuthenticated()')}">                    <form id="f" th:action="@{/logout}" method="post" role="form" class="navbar-form">                        <button type="submit" th:text="#{navbar.logout.text}" class="btn btn-primary"/>                    </form>                </li>            </ul>錯(cuò)誤截圖:
查看完整描述

1 回答

?
心有法竹

TA貢獻(xiàn)1866條經(jīng)驗(yàn) 獲得超5個(gè)贊

當(dāng) Thymeleaf Extras Spring Security 版本與 Spring Framework 版本不兼容時(shí)會(huì)發(fā)生此錯(cuò)誤,在這種情況下,Spring Boot 版本適用于 Spring Framework 5.x 版,而您擁有的 Thymeleaf Extras Spring Security 版本是 4.x。您需要更新 pom.xml 中的 artifactId 并選擇兼容版本或讓 Spring Boot 為您選擇版本


<dependency>

    <groupId>org.thymeleaf.extras</groupId>

    <artifactId>thymeleaf-extras-springsecurity5</artifactId>

    <scope>compile</scope>

</dependency>


查看完整回答
反對(duì) 回復(fù) 2021-11-11
  • 1 回答
  • 0 關(guān)注
  • 362 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)