摘要:        
通过配置文件配置 spring.security.user.name=javaboy spring.security.user.password=1234 # 角色: 支持数组 spring.security.user.roles=admin 配置完毕,再次启动项目,访问 /hello 一样的输入用    阅读全文
posted @ 2020-05-13 22:50
Leader_TBlog
阅读(210)
评论(0)
推荐(0)
        
            
        
        
摘要:        
创建工程 选择依赖 这里只需要引入上面两个依赖即可, next 重点: 只要加入了 Security 的依赖,项目中的所有接口统统被保护起来了! @RestController public class HelloController { @GetMapping("/hello") public S    阅读全文
posted @ 2020-05-13 22:15
Leader_TBlog
阅读(124)
评论(0)
推荐(0)
        

 浙公网安备 33010602011771号
浙公网安备 33010602011771号