第一步,创建springboot的web项目,并导入springSecurity的pom依赖 <!-- spring-security 安全框架依赖 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <!-- spring-boot的web依赖(如果创建项目时没有勾选,可以手动加上) --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> springboot项目如果导入security依赖后会自动托管整个项目,前端在访问项目的任何路径时会被拦截并跳转到security默认的登录页面,登录用户名为user,密码为控制台启动项目时生成的随机密码 第二步 自定义设置用户的认证和请求权限设置...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile