码迷,mamicode.com
首页 > 编程语言 > 详细

Thymeleaf整合到Spring Security,标签sec不起作用

时间:2019-10-17 15:51:25      阅读:396      评论:0      收藏:0      [点我收藏+]

标签:extras   lease   head   char   style   bsp   依赖   cti   html   

将 pom 文件中的 thymeleaf-extras-springsecurity4 依赖改成  thymeleaf-extras-springsecurity5

     <dependency>
            <groupId>org.thymeleaf.extras</groupId>
            <artifactId>thymeleaf-extras-springsecurity5</artifactId>
            <version>3.0.4.RELEASE</version>
        </dependency>

还要在 HTML 页面引入约束

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
</head>

 

Thymeleaf整合到Spring Security,标签sec不起作用

标签:extras   lease   head   char   style   bsp   依赖   cti   html   

原文地址:https://www.cnblogs.com/BeenTogether/p/11692242.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!