SpringBoot集成Security,JWT,Swagger全分析

news/2024/7/3 12:29:53
GitHub地址: https://github.com/li-jun0201/springsecuritydemo
本项目采用SpringBoot1.5.9, SpringSecurity,JWT, Redis,Swagger2,Jpa, 采用Restful api风格访问
由于采用SpringData-JPA,不用建表,不用配置相关xml
启动注意事项:
1. 建议使用IDEA开发工具,并安装lombok插件
如有问题 参考: http://www.cnblogs.com/holten/p/5729226.html
2. 在application-dev.yml文件中配置好 JDBC, Redis的相关属性
需要更改处 *****
3. 执行Test26SecurityApplication 启动类
项目启动成功后:
swagger2路径: http://localhost/security/swagger-ui.html

注册接口: http://localhost/security/auth/register
登陆接口: http://localhost/security/auth/login

角色相关
普通用户访问: http://localhost/security/auto/user
管理用户访问: http://localhost/security/auto/admin
普通管理用户: http://localhost/security/auto/all

转载于:https://www.cnblogs.com/xifenglou/p/9088209.html


http://www.niftyadmin.cn/n/4557817.html

相关文章

Java集合的forEach遍历

集合的forEach遍历 List集合 ArrayList<String> arrayList new ArrayList<>();// 添加元素arrayList.add("萧炎");arrayList.add("唐三");arrayList.add("石昊");arrayList.add("夏新");arrayList.forEach(x-> Syst…

C语言的难题啊

结果为5B 0X30十六进制数转换为十进制为48 3*16的一次方加上0*16的零次方C 53 - 49 4C是答案 ||| 知道字符5的编码是多少自己算下就知道了 字符‘5’对应的整数是53A 字符之间可以相加减

unity 背景无限循环滚动效果

背景无限循环滚动效果如下示&#xff1a; 步骤如下&#xff1a; 导入背景图片后&#xff0c;设置图片的格式&#xff0c;如下图&#xff1b;2.图片格式也可以设置是Texture格式&#xff0c;但是Wrap Mode 一定要是Repeat[重复发生]&#xff1b;然后记得Apply一下。[解释&#x…

ZIP压缩与解压缩(只有代码)

ZIP压缩与解压缩 主要使用类 ZipEntryZipInputStreamZipOutputStream import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import…

mysql jar包下载导入与Loading class `com.mysql.jdbc.The new driver class is `com.mysql.cj.jdbc.Driver‘.问题解决

mysql数据库连接 下载 下载网址&#xff1a;https://dev.mysql.com/downloads/ java下载红框标的。 我是下载 ZIP文件的 在Java中导入jar包 在Project Structure中导入&#xff0c;选择 Libraries 点击 号并选择需要导入的Module 打开快捷键 &#xff1a;Ctrl Shift Alt …

C语言

cid9D5E17E1B02857A563F3CDE2C79A42B54B1F5FB9&t13&fmt-这个是用迅雷下的下一个迅雷在点击下载文件是csf格式直接去下一个csf格式播放器就可以播放了 当然要用软件啦Turbo C这个就可以了教程&#xff1a;http://119.147.41.16/down

C#截取字符串 200分 求答案

3); s1.LastIndexOf(".txt")); ||| s1.Substring(0 s1.Substring(0

2018.5.26 做了点attacklab

只做了第一套热身题&#xff0c;就是通过覆盖返回地址来强制执行另外一个准备好的函数&#xff0c;不过光这个热身题就搞得够呛。。。主要是花了很多时间读lab文档&#xff0c;最后总算上手&#xff0c;不容易。。。转载于:https://www.cnblogs.com/dynasty919/p/9094899.html