上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 81 下一页
摘要: 参考: https://wenku.baidu.com/view/3712610bb7daa58da0116c175f0e7cd184251804.html https://blog.csdn.net/u013343616/article/details/120492725 https://blog 阅读全文
posted @ 2022-07-28 16:12 Mars.wang 阅读(1111) 评论(0) 推荐(0) 编辑
摘要: 参考:https://blog.csdn.net/WXF_Sir/article/details/124603774 https://www.jianshu.com/p/36a065065e3c 1. 从无到有 —— 了解Bean容器首先得了解Scope(作用域),简单介绍两种。 1. single 阅读全文
posted @ 2022-07-27 13:17 Mars.wang 阅读(2238) 评论(0) 推荐(0) 编辑
摘要: 想封装一个调用远程http接口的工具类。 第一个想到的就是Springboot中的RestTemplate,写了一个get请求,很容易就成功了。 但是写post请求的时候,无论怎么搞,都拿不到请求值。不得已换成了okHttp,很快就成功了。 把代码贴在这里,做一个记录。 统一了GET、POST请求的 阅读全文
posted @ 2022-07-26 10:15 Mars.wang 阅读(138) 评论(0) 推荐(0) 编辑
摘要: graphiql是一个graphql浏览器IDE,可以自动提示graphql语法是否正确,给出建议。 这对于刚开始学习graphql的同学是非常棒的工具。 一、graphiql依赖包 项目中用到的依赖包如下: <dependency> <groupId>com.graphql-java</group 阅读全文
posted @ 2022-07-25 09:31 Mars.wang 阅读(765) 评论(0) 推荐(0) 编辑
摘要: springboot过滤器和拦截器 定义一个拦截器从,session中反查出用户信息,当然这只是一个demo @Component public class HttpRequestInterceptor implements HandlerInterceptor { @Override public 阅读全文
posted @ 2022-07-21 10:30 Mars.wang 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 数据获取类 public class GraphQLDataFetchers { private static List<Map<String, String>> books = Arrays.asList( ImmutableMap.of("id", "book-1", "name", "Harr 阅读全文
posted @ 2022-07-20 10:24 Mars.wang 阅读(384) 评论(0) 推荐(0) 编辑
摘要: public byte[] getFileContent(String path) { try (FileInputStream in = new FileInputStream(path); ByteArrayOutputStream bos = new ByteArrayOutputStream 阅读全文
posted @ 2022-07-20 09:16 Mars.wang 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 参考: https://www.jianshu.com/p/331a3e1aeba2 https://www.jianshu.com/p/1d4d73040770 https://blog.csdn.net/JavaMonsterr/article/details/125147335 https:/ 阅读全文
posted @ 2022-07-19 13:49 Mars.wang 阅读(684) 评论(0) 推荐(0) 编辑
摘要: 转自:https://www.jb51.net/article/240466.htm 参考:https://www.liaoxuefeng.com/wiki/1252599548343744/1306581182447650 一.利用多线程 直接new线程 Thread t = new Thread 阅读全文
posted @ 2022-07-15 10:12 Mars.wang 阅读(1997) 评论(0) 推荐(0) 编辑
摘要: 转自:https://www.cnblogs.com/beiyan/p/5946345.html 参数校验是我们程序开发中必不可少的过程。用户在前端页面上填写表单时,前端js程序会校验参数的合法性,当数据到了后端,为了防止恶意操作,保持程序的健壮性,后端同样需要对数据进行校验。后端参数校验最简单的做 阅读全文
posted @ 2022-07-15 09:06 Mars.wang 阅读(555) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 81 下一页