Coder Social home page Coder Social logo

blog's Issues

SysUserDetailsService用户登录service

Set<GrantedAuthority> authorities = new HashSet<>(); // 角色集合

请问这里为什么是角色集合?????我理解是当前用户的权限集合。
请问可以解释一下吗??

hello about the spring-boot-weblogic-demo

hi i am newer to springboot and weblogic
i try to deploy the spring-boot-weblogic-demo project to weblogic 12c ( docker pull ismaleiva90/weblogic12)
when i try to deploy, below errors :
错误 无法访问所选应用程序。 错误 java.io.IOException 错误 weblogic.utils.compiler.ToolFailureException

can you help to solve this problem

spring-security-jwt-demo发现的一个奇怪的问题

你好!~
在参照你的配置,配置springSecurity的时候我发现你在/src/main/java/com/c3stones/security/config/SysSecurityConfig.java中配置自定义未认证处理类的时候是这样写的:

http.authorizeRequests() // 权限配置
				.antMatchers(JWTConfig.antMatchers.split(",")).permitAll()// 获取白名单(不进行权限验证)
				.anyRequest().authenticated() // 其他的需要登陆后才能访问
				.and().httpBasic().authenticationEntryPoint(userNotLoginHandler) // 配置未登录处理类
                                ......

参照你的配置我定义了处理类,在postman中发送请求得到的结果是正确的(自定义json),但是在浏览器中直接访问却发生了重定向(断点都没有进入),在反复确认和debug以及查找问题后发现未认证处理类和权限不足的处理类配置应当是这样:

http.exceptionHandling().accessDeniedHandler(userAccessDeniedHandler)// 配置没有权限处理类
                .authenticationEntryPoint(userNotLoginHandler) // 配置未登录处理类

再次测试结果正确,想请教下为什么postman和浏览器的结果存在差异,以及po主踩了这个坑嘛~~,希望能得到你的回复~~
来自博客:https://www.cnblogs.com/cao-lei/p/13298394.html
源码仓库:https://github.com/C3Stones/blog/tree/master/spring-security-jwt-demo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.