上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 81 下一页
摘要: 数据获取类 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 阅读(407) 评论(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 阅读(193) 评论(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 阅读(723) 评论(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 阅读(2170) 评论(0) 推荐(0)
摘要: 转自:https://www.cnblogs.com/beiyan/p/5946345.html 参数校验是我们程序开发中必不可少的过程。用户在前端页面上填写表单时,前端js程序会校验参数的合法性,当数据到了后端,为了防止恶意操作,保持程序的健壮性,后端同样需要对数据进行校验。后端参数校验最简单的做 阅读全文
posted @ 2022-07-15 09:06 Mars.wang 阅读(583) 评论(0) 推荐(0)
摘要: 问题 Java后台程序读取数据库时间,在前端页面进行展示的时候,出现了错误,展示的时间和数据库中的时间不一致。 java读到的时间和MySQL比快了13个小时 再在网上搜索一下,最后在这篇文章中找到了答案。原因就是Java和Mysql协商时区时把 Mysql 的 CST 时间以美国中部时间:UTC- 阅读全文
posted @ 2022-07-13 15:06 Mars.wang 阅读(515) 评论(0) 推荐(0)
摘要: 在springboot中使用jdbcTemplate 在springboot中使用jdbcTemplate(2)-多数据源 在springboot中使用jdbcTemplate(3) 在springboot中使用jdbcTemplate(4) 在springboot中使用jdbcTemplate(5 阅读全文
posted @ 2022-07-13 09:33 Mars.wang 阅读(749) 评论(0) 推荐(0)
摘要: 有时候在做单元测试的时候,会报错 Command line is too long问题解决 这是因为引入的jar包太多了,导致命令行太长超过了系统的限制。 此时可以通过在.idea/workspace.xml中 找到 <component name="PropertiesComponent"> .. 阅读全文
posted @ 2022-07-12 15:26 Mars.wang 阅读(1170) 评论(0) 推荐(0)
摘要: springboot的注入默认范围是单例,但是实际上是有几个范围可选的,如下: 1)singleton: 单例,默认 2)prototype:多例 3)request:在一次http请求内有效 4)session:在一个用户会话内有效 5)globalSession:在全局会话内有效 一、一个类只有 阅读全文
posted @ 2022-07-12 13:21 Mars.wang 阅读(1887) 评论(1) 推荐(0)
摘要: 参考: https://blog.csdn.net/qq_25863845/article/details/123475147 https://www.bbsmax.com/A/pRdBa7E25n/ 一、单例对象依赖原型对象 springboot中大部分都是单例,如果一个单例对象中注入了另一个原型 阅读全文
posted @ 2022-07-12 12:31 Mars.wang 阅读(588) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 81 下一页