简体   繁体   English

如何在没有配置的情况下将spring boot security用于自定义登录页面?

[英]How to use spring boot security for custom login page without configuration?

I am using spring security on spring boot app and I cannot use the custom login page I made. 我在Spring Boot应用程序上使用Spring Security,但无法使用我创建的自定义登录页面。 I want to use custom login page by default without using configuration controller, instead I want to change configuration from application.properties. 我想默认情况下使用自定义登录页面而不使用配置控制器,而是要从application.properties更改配置。 Also I want to deny access to other pages until login successful. 我也想拒绝访问其他页面,直到成功登录。 Please help me to log out of the application. 请帮助我退出该应用程序。

The Spring Security Reference provides an extensive guide on how to implement your custom login page. Spring Security Reference提供了有关如何实现定制登录页面的详尽指南

I put together a small example in this repo 我在这个仓库中整理了一个小例子

Spring Security With Customn login Page Spring Security with Customn登录页面

An example of spring security with custom login page is provided along with that sitemash+hibernate is also implemented you have to create a database dumb is given in the readme file. 提供了一个带有自定义登录页面的Spring安全示例,同时还实现了sitemash + hibernate,您必须在自述文件中指定创建数据库哑包的方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM