摘要: web开发安全框架 提供认证和授权功能! 一.SpringSecurity 1.导入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifa 阅读全文
posted @ 2022-07-11 16:22 路漫漫qixiuyuanxi 阅读(2196) 评论(0) 推荐(0) 编辑
摘要: Springboot中数据库连接 一.jdbc的方式连接 1.配置jdbc连接文件 spring: datasource: username: root password: 123123 url: jdbc:mysql://localhost:3306/mybatis?useUnicode=true 阅读全文
posted @ 2022-07-10 15:52 路漫漫qixiuyuanxi 阅读(981) 评论(0) 推荐(0) 编辑
摘要: 将登录的session保存!!! 1.实现一个拦截器类 package com.demo1.springboot.config; /** * @author panglili * @create 2022-07-09-10:33 */ import org.springframework.web.s 阅读全文
posted @ 2022-07-09 11:32 路漫漫qixiuyuanxi 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 1.前端传数据后端接收: 用户在登录界面输入用户名和密码传给后端controller,由后端判断是否正确! 在html界面中要传递的数据name命名,通过表单的提交按钮会传递给响应的controller,在controller将需要的name接收! <input type="text" name=" 阅读全文
posted @ 2022-07-09 10:30 路漫漫qixiuyuanxi 阅读(1556) 评论(1) 推荐(1) 编辑