文章分类 -  实用

摘要:认证失败处理器 这里@Component注解别忘了,因为在Security配置实现类中需要注入这个对象 @Component public class AuthenticationEntryPointImpl implements AuthenticationEntryPoint { @Overri 阅读全文
posted @ 2022-08-08 19:19 长情c 阅读(1071) 评论(0) 推荐(0)
摘要:引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <!--redis依赖--> <depe 阅读全文
posted @ 2022-08-08 13:26 长情c 阅读(47) 评论(0) 推荐(0)
摘要:在我们的项目中有时候需要的日期格式并不是下面这样的,那我们怎么解决呢? 局部解决 在实体类日期类型字段上加上注解,前提是导入fastjson包,这里就不多说了。 @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") 效果 全 阅读全文
posted @ 2022-08-07 16:43 长情c 阅读(393) 评论(0) 推荐(0)
摘要:我们都知道lombok有好多好用的注解如@Data,@Setter,@Getter等,今天又学习到了另一种好用的注解它就是@Accessors,这个注解有啥用呢?就是支持链式编程。具体的应用请看下文。 package com.mrs.entity; import java.util.Date; im 阅读全文
posted @ 2022-08-07 13:30 长情c 阅读(184) 评论(0) 推荐(0)
摘要:之前也是推荐过MybatisX这个插件的使用方法,这次换一种插件,就是EasyCode,它也是根据数据库表来生成代码了,一键生成实体类,dao,service,service实现类,controller等非常方便 但是呢?这个模板要配置好,不然是不如MybatisX的,设置好模板一键生成就完事 1. 阅读全文
posted @ 2022-08-06 12:54 长情c 阅读(500) 评论(0) 推荐(0)
摘要:大家有没有觉得BeanUtils有的操作重复了,自己又很懒不想做重复的事呢 List<HotArticleVo> articleVos = new ArrayList<>(); for (Article article : articles) { HotArticleVo vo = new HotA 阅读全文
posted @ 2022-08-06 12:39 长情c 阅读(60) 评论(0) 推荐(0)
摘要:FAILED: QtDemo.exe cmd.exe /C "cd . && "D:\Program Files\JetBrains\CLion 2022.1.1\bin\mingw\bin\g++.exe" -g CMakeFiles/QtDemo.dir/QtDemo_autogen/mocs_ 阅读全文
posted @ 2022-07-23 13:54 长情c 阅读(1158) 评论(0) 推荐(1)
摘要:CMake Error at CMakeLists.txt:11 (find_package): By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package 阅读全文
posted @ 2022-07-23 13:01 长情c 阅读(3301) 评论(0) 推荐(0)
摘要:2022-07-19 18:53:58.210 WARN 1244 [nio-8888-exec-3] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.web.multipart.MaxUploadSi 阅读全文
posted @ 2022-07-19 19:08 长情c 阅读(669) 评论(0) 推荐(0)
摘要:这里使用的还是hutools工具 https://gitee.com/link?target=https%3A%2F%2Fwww.hutool.cn%2Fdocs%2F%23%2Fpoi%2FExcel%25E5%25B7%25A5%25E5%2585%25B7-ExcelUtil 导出 经典导包环 阅读全文
posted @ 2022-07-15 13:10 长情c 阅读(3782) 评论(0) 推荐(0)
摘要:安装依赖 npm i axios -S 查看axios版本 npm axios -v 封装request请求 import axios from 'axios' const request = axios.create({ baseURL: '/api', // 注意!! 这里是全局统一加上了 '/ 阅读全文
posted @ 2022-07-14 18:26 长情c 阅读(1050) 评论(0) 推荐(0)
摘要:参考链接:https://blog.csdn.net/weixin_43740223/article/details/108491386 还是建议用knife4j这玩意报错多,还丑 阅读全文
posted @ 2022-07-14 15:59 长情c 阅读(29) 评论(0) 推荐(0)
摘要:直接转发了,这玩意太难用了 参考链接:https://blog.csdn.net/xqnode/article/details/86557784?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165778491616782391830 阅读全文
posted @ 2022-07-14 15:51 长情c 阅读(53) 评论(0) 推荐(0)
摘要:##无法访问后台地址 首先swagger3.0后的访问地址为:http://localhost:8080/swagger-ui/index.html 以往的2.0的访问地址是http://localhost:8080/swagger-ui.html 问题原因:其次就是2.0需要导入2个包,而3.0需 阅读全文
posted @ 2022-07-14 15:43 长情c 阅读(1351) 评论(0) 推荐(0)
摘要:ServletRequestUtils工具类 ServletRequestUtils是Spring MVC内置的一个工具类 可以看到这个工具类可以支持很多类型的设置参数值 以前获取请求参数是用过下面这种形式的 String name = request.getParameter("parameter 阅读全文
posted @ 2022-07-12 10:05 长情c 阅读(376) 评论(1) 推荐(0)
摘要:##1.导入maven依赖 <dependency> <groupId>com.github.xiaoymin</groupId> <artifactId>knife4j-spring-boot-starter</artifactId> <version>3.0.2</version> </depe 阅读全文
posted @ 2022-07-05 19:38 长情c 阅读(108) 评论(0) 推荐(0)
摘要:我们在idea下创建了一个项目,然后在创建一个本地仓库 然后由于你本地仓库是有东西的,远程仓库也是 然后你进行push会出现这个报错 ==解决办法== 在控制台输入这个命令 git pull origin master --allow-unrelated-histories 然后push就成功了。 阅读全文
posted @ 2022-06-29 08:53 长情c 阅读(447) 评论(0) 推荐(0)
摘要:可以这么理解,标签就是你游戏中的存档,通过标签你可以快速的切换到标记时的一个版本。 最后一个命令说一下,什么是检出呢?就是把当时标签的状态下载下来,然后就能拿到当时那个状态的代码。 git tag命令 git tag [name]命令 git push [shortName] [name]命令 gi 阅读全文
posted @ 2022-06-29 08:14 长情c 阅读(40) 评论(0) 推荐(0)
摘要:1.git分支操作 git branch命令 查看分支 git branch【name】命令 新建分支 git checkout命令 切换分支 4.git push [shortName] [name]命令 ==由于你新建的分支是本地的并没有推送,所以需要Push一下== 推送本地分支到远程仓库 g 阅读全文
posted @ 2022-06-29 07:22 长情c 阅读(44) 评论(0) 推荐(0)
摘要:最近呢做项目的时候又看到了git教程,直接复习一下吧! 顺便提一下这个东西是什么?fork的意思是从别人的代码库中复制一份到你自己的代码库,与普通的复制不同,fork包含了原有库中的所有提交记录,fork后这个代码库是完全独立的,属于你自己,你可以在自己的库中做任何修改,当然也可以通过Pull Re 阅读全文
posted @ 2022-06-28 22:24 长情c 阅读(27) 评论(0) 推荐(0)