security遇到的问题

This may be the result of an unspecified view, due to default view name generation

解决方案

在pom文件中增加配置

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

 java.lang.IllegalArgumentException: There is no PasswordEncoder mapped for the id "null"

解决方案

给密码加密

 thymeleaf整合springsecurity的依赖包

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

 

 导入thymeleaf-extras-springsecurity4后发现页面的sec:authorize="isAuthenticated()"不生效,然后就改为了thymeleaf-extras-springsecurity5

页面跳转失败,需要配置视图

 


版权声明:本文为weixin_44279647原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。