![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
文章平均质量分 71
Coding_小平
生而无畏,快乐编程
展开
-
springboot-缓存管理
文章目录一、使用springboot默认的缓存管理在启动类上加上@EnableCaching ,代表开启Spring Boot基于注解的缓存管理支持所有缓存注解使用都在Service层下缓存的注解:缓存注解的常用属性二、springboot整合Redis缓存实现1.基于注解的Redis缓存实现2.基于API的Redis缓存实现自定义RedisCacheManager缓存管理器的默认序列化机制springboot默认使用Simple缓存组件进行缓存管理,Simple组件位于9大缓存组件最后一个(按顺序启用原创 2021-10-20 09:40:49 · 1098 阅读 · 0 评论 -
springboot---文件上传
文章目录file.html 单文件上传单文件上传 controllermultifile.html 多文件上传多文件上传 controller加入thymeleaf依赖MultipartFile 接受前台传过来的文件file.getOriginalFilename() 获取上传文件的文件名写明文件存储的位置file.transferTo(dest); 将上传文件写到服务器上指定的文件new File(“xxx.xxx”) 只是在内存中创建File文件映射对象,而并不会在硬盘中创建文件原创 2021-10-17 21:37:51 · 452 阅读 · 0 评论 -
springboot整合spring security(一) :身份认证,自定义用户授权管理
文章目录springboot整合spring security使用UserDetailsService 身份认证前端html数据库1.导入security的启动依赖2.创建Customer(用户信息)、Authority(用户权限) 两个实体类3.创建查询接口CustomerRepository、AuthorityRepository4.创建RedisConfig类5.添加CustomerService业处理类 (查询用户信息和权限)6.自定义接口实现类UserDetailsServiceImpl 进原创 2021-10-15 21:20:50 · 1969 阅读 · 0 评论 -
Springboot中temlates和static
文章目录statictemplatesspringboot默认 static中放静态页面,而templates中放动态页面**注:html链式引入css或js时,路径默认是从static开始的 **lg : href="/css/mycss.css"加入thymleaf依赖后,springboot中controller中的跳转页面操作,自动跳转templates下的页面,而不会扫描static下的页面staticstatic文件夹默认存放的是静态资源 静态页面static文件夹中的html页原创 2021-10-16 23:39:55 · 343 阅读 · 0 评论