
SpringSecurity
SpringSecurity的实战记录
天元白手
专精于企业数据分析、设计及实施商业智能业务解决方案、软件开发及数据管理和治理。
展开
-
SpringSecurity使用配置类来配置用户名和密码
配置类: package com.thunder.config; import org.springframework.beans.factory.annotation.Configurable; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.原创 2021-07-25 15:04:42 · 335 阅读 · 0 评论 -
SpringSecurity自定义设置登陆页面
自定义设置登陆页面,不需要认证就可以访问。 只需要在继承了WebSecurityConfigurerAdapter配置类中进行设置就可以了 /** * 自定义登陆页面,不需要认证可以访问 * * @param http * @throws Exception */ @Override protected void configure(HttpSecurity http) throws Exception { // 配置认证原创 2021-07-25 15:02:14 · 295 阅读 · 0 评论 -
SpringSecurity的简单案例
创建一个项目只需要加入security和web的依赖: <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <de原创 2021-07-25 14:59:02 · 491 阅读 · 1 评论