
spring security
楓叶子
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
AuthenticationManager和UserDetailsService的关系
项目中用到 Spring Security 进行权限管理,其中刚开始的代码就有构造登陆者的身份信息进行认证和授权。// 用户验证 Authentication authentication = null; try { // 该方法会去调用UserDetailsServiceImpl.loadUserByUsername authentication = authenticationManager原创 2021-08-23 14:41:57 · 2700 阅读 · 4 评论 -
spring security配置文件中的and()
在使用 spring security的过程中需要使用继承WebSecurityConfigurerAdapter类重写里面的configure(HttpSecurity httpSecurity)方法,配置里面的参数用于达到自定义拦截请求的目的。在看到and()方法的时候进入源码public abstract class SecurityConfigurerAdapter<O, B extends SecurityBuilder<O>> implements Security原创 2021-07-14 10:04:19 · 530 阅读 · 0 评论 -
Spring Security登录配置文件讲解
spring security的登录文件一般会自己重新定义,重新里面的方法 configure,设置方法参数属性,达到重新自定意拦截登录以及重定向方法的作用。方法参数为 HttpSecurity http //设置表单提交 http.formLogin(). //重新定义表单的username接受值的key usernameParameter("name"). //重新定义表单的password接受值的key passwordParameter("pass"). //当发现/log原创 2021-07-09 10:57:01 · 377 阅读 · 0 评论 -
WebSecurityConfigurerAdapter中的configuer
configuer方法讲解// WebSecurityConfigurerAdapter默认设定访问权限和登录方式protected void configure(HttpSecurity http) throws Exception { logger.debug (”Using default configure(HttpSecurity). + "If subclassed thwill potentially" +"overrdesubclass configure (HttpSecur原创 2021-03-12 16:43:24 · 1489 阅读 · 0 评论