01-spring boot 2.6.2 spring security 集成
家电修理 2023-07-16 19:16www.caominkang.com电器维修
01-spring boot 2.6.2 spring security 集成
更多关注JeeGit 5.0 企业级快速开发平台
在spring boot 项目中引入 spring security 的模块.springframeork.boot spring-boot-starter-security
完整代码如下
创建一个ebcontroller 类,内置一个请求。4.0.0 jeegit-basic .godzt jeegit-meta5.0.1-SNAPSHOT ../meta/pom.xml jar jeegit basic https://.jeegit. jeegit basic for eb application 2022-No .godzt jeegit-mon${project.parent.version} .godzt jeegit-frameork-basicinfo${project.parent.version} .springframeork.boot spring-boot-starter-security.springframeork.boot spring-boot-maven-plugin.apache.maven.plugins maven-surefire-plugintrue taoist-info hailu Yao admin at jeegit. Project lead +8 GodZT https://.godzt.
package .godzt.jeegit.eb;
import .springframeork.eb.bind.annotation.RequestMapping;
import .springframeork.eb.bind.annotation.RestController;
@RestController
@RequestMapping(value="")
public class HelloWorld {
@RequestMapping(value="")
public String demo()
{
return "hello orld";
}
}
启动spring boot
控制台会打印 默认分配的用户名密码
Using generated security passord: 055f1b98-32e9-4f64-ac52-595baa5ada2d
则 默认的用户名是 user 密码见 控制台
http://localhost:8080/login 登录地址
http://localhost:8080/ogout 退出地址
更多关注JeeGit 5.0 企业级快速开发平台
空调维修
- 我的世界电脑版运行身份怎么弄出来(我的世界
- 空调抽湿是什么意思,设置抽湿的温度有什么意
- 方太燃气灶有一个打不着火 怎么修复与排查方法
- 夏季免费清洗汽车空调的宣传口号
- 清洗完空调后出现漏水现象
- iphone6能玩什么游戏(iphone6游戏)
- 如何设置电脑密码锁屏(如何设置电脑密码锁屏
- win10删除开机密码提示不符合密码策略要求
- 电脑w7显示不是正版(w7不是正版怎么解决)
- 万家乐z8热水器显示e7解决 怎么修复与排查方法
- 1匹空调多少瓦数(1匹空调多少瓦)
- 安卓手机连接电脑用什么软件好(关于安卓手机
- 电脑网页看视频卡是什么原因(爱拍看视频卡)
- 华帝燃气灶点火器一直响然后熄火怎么办:问题
- 电脑壁纸怎么换(关于电脑壁纸怎么换的介绍)
- 冬天空调的出风口应该朝什么方向(冬天空调风