SpringSecurity
在web开发中,安全第一位。过滤器,拦截器。
无功能性需求,应在设计之初考虑。
Spring Security is a powerful and highly customizable authentication and access-control framework. It is the de-facto standard for securing Spring-based applications.
Spring Security is a framework that focuses on providing both authentication and authorization to Java applications. Like all Spring projects, the real power of Spring Security is found in how easily it can be extended to meet custom requirements
横切 config配置类
简介
Spring Security是针对Spring项目的安全框架,也是Spring Boot底层安全模块默认的技术选型,他可以实现强大的Web安全控制,我们仅需要引入 spring-boot-start-security模块,进行少量的配置即可实现强大的安全管理。
记住几个类:
- WebSecurityConfigureAdapter:自定义Security策略
- AuthenticationManagerBuilder:自定义认证策略
- @EnableWebSecurity: 开启Websecurity模式
Spring Security的两个主要目标是"认证"和"授权"。
"认证"(Authentication)
"授权"(Authorization)
这个概念是通用的,而不只在Spring Security中存在
参考官网[https://spring.io/projects/spring-security],根据自己的版本找到对应的帮助文档。
网友评论