随笔分类 -  踏平的坑

摘要:热部署 即 修改代码不用重启项目 idea自动重启 在debug模式下 使用最新的代码 说白了就是避免修改完代码频繁启动项目 idea自动完成 1.pom导入jar <dependency> <groupId>org.springframework.boot</groupId> <artifactI 阅读全文
posted @ 2021-08-27 09:57 wf.zhang 阅读(555) 评论(0) 推荐(0)
摘要:参考链接: https://blog.csdn.net/Marmara01/article/details/85196803 final、finally、finalize 有什么区别? final:是修饰符,如果修饰类,此类不能被继承;如果修饰方法和变量,则表示此方法和此变量不能在被改变,只能使用。 阅读全文
posted @ 2021-08-06 15:47 wf.zhang 阅读(133) 评论(0) 推荐(0)
摘要:/** * RSA公钥加密 * * @param str * 加密字符串 * @param publicKey * 公钥 * @return 密文 * @throws Exception * 加密过程中的异常信息 */ public static String encrypt( String str 阅读全文
posted @ 2021-06-23 16:21 wf.zhang 阅读(1152) 评论(0) 推荐(0)
摘要:public static Map<Integer, String> genKeyPair() throws NoSuchAlgorithmException { //保存用户级别公钥和私钥对 Map<Integer, String> keyMap = new HashMap<Integer, St 阅读全文
posted @ 2021-06-23 16:18 wf.zhang 阅读(1212) 评论(0) 推荐(0)
摘要:出现情况如下 解决 指定版本 即可解决 阅读全文
posted @ 2021-05-12 13:19 wf.zhang 阅读(586) 评论(0) 推荐(0)
摘要:解决 在pom文件中<builder>标签引入一下 如果还报错将target目录删除 重新run <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </ 阅读全文
posted @ 2021-05-12 13:16 wf.zhang 阅读(733) 评论(0) 推荐(0)
摘要:public class Test { /*** * 使用java代码 将下列界面中的数据进行合并,必须定义初始数据的存储类型,必须定义结果集的数据类型,写出实现合并的逻辑过程 * NUM QTY */ public static void main(String[] args) { //初始化数据 阅读全文
posted @ 2020-09-19 18:04 wf.zhang 阅读(292) 评论(0) 推荐(0)
摘要:List<StudentDTO> oldList = Arrays.asList( new StudentDTO(111, "aaa", 16, "123@163", "123"), new StudentDTO(222, "bbb", 18, "123@163", "456"), new Stud 阅读全文
posted @ 2020-08-28 00:01 wf.zhang 阅读(1864) 评论(0) 推荐(0)
摘要:报错如下 解决 url 加上 ?serverTimezone=GMT%2B8 分析 时区问题,MySQL驱动默认UTC时区。 也可以修改Mysq # 设置全局时区 mysql> set global time_zone = '+8:00'; Query OK, 0 rows affected (0. 阅读全文
posted @ 2020-08-23 17:52 wf.zhang 阅读(461) 评论(0) 推荐(0)
摘要:在实际项目中,我们常常需要把两个相似的对象相互转换,其目的是在对外提供数据时需要将一部分敏感数据(例如:密码、加密 token 等)隐藏起来 多用于DTO VO DO 对象转换 需要用到的jar <!-- https://mvnrepository.com/artifact/org.modelmap 阅读全文
posted @ 2020-08-22 22:11 wf.zhang 阅读(9907) 评论(0) 推荐(0)
摘要:出自 https://mp.weixin.qq.com/s/w2Bt0TzMIju7p4-fSJ6wfw 公众号 码匠笔记 根据某一条件从数据库表中查询 『有』与『没有』,只有两种状态,那为什么在写SQL的时候,还要SELECT count(*) 通常写法 #### SQL写法: SELECT co 阅读全文
posted @ 2020-07-27 16:33 wf.zhang 阅读(664) 评论(0) 推荐(0)
摘要:<if test="state != null and state == 1 "> AND d.state != 0 </if> <if test="state != null and state == 0 "> AND d.state = 0 </if> 要使用 == 阅读全文
posted @ 2020-06-12 15:34 wf.zhang 阅读(792) 评论(0) 推荐(0)
摘要:记录下 报错信息如下 org.springframework.web.method.annotation.MethodArgumentConversionNotSupportedException: Failed to convert value of type 'java.lang.String[ 阅读全文
posted @ 2020-06-11 14:20 wf.zhang 阅读(7513) 评论(0) 推荐(1)
摘要:URL编码后 空格变成了 + URL传参加号变空格的问题,在页面中把+号替换为'% 2B'可以得到解决str = str.replace(“+”,“% 2B”);说明:%和2之间是没有空格的,因为在网页上显示时,会被转义为+号,所以本人加了个空格,实际应用中是没有的。希望能解决您的问题。 阅读全文
posted @ 2020-05-20 10:30 wf.zhang 阅读(2065) 评论(0) 推荐(0)
摘要:使用以下url 使用自己的数据库 这里是yml文件的格式 url: jdbc:mysql://localhost:3306/clouddb01?useSSL=true&serverTimezone=UTC&characterEncoding=UTF8 阅读全文
posted @ 2020-01-09 10:57 wf.zhang 阅读(656) 评论(0) 推荐(0)
摘要:public class TestSimpleDateFormat { private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public static Date pars 阅读全文
posted @ 2020-01-02 16:32 wf.zhang 阅读(2428) 评论(0) 推荐(0)
摘要:导入不同的包结果完全不一样 Spring 的 BeanUtils (推荐使用) 前一个内容 复制到 后一个 Apache 的 BeanUtils (性能差 不推荐使用) 后一个内容 复制到 前一个 public class Student { /** 学号 */ private long id; p 阅读全文
posted @ 2019-12-31 18:44 wf.zhang 阅读(992) 评论(0) 推荐(0)
摘要:数据库表里面存在text或者blob字段。逆向工程自动生成的MyBatis的xml中会多出几个以withBlobs结尾的方法和resultMap 此时查询数据或者更新数据的使用仍然使用selectByPrimaryKey或者updateByPrimaryKey,得到的text或者blob数据是nul 阅读全文
posted @ 2019-12-12 09:27 wf.zhang 阅读(1921) 评论(0) 推荐(0)
摘要:public class Test { public static void main(String[] args) { LocalDate ld = LocalDate.of(2018, 6, 6); LocalDate ld2 = LocalDate.now(); Period period = 阅读全文
posted @ 2019-12-06 16:05 wf.zhang 阅读(442) 评论(0) 推荐(0)
摘要:addAll 添加另一集合里面的元素 add 添加整个集合包括 [] Stream 操作 合并两个lis 出自http://www.it1352.com/963663.html 1 public class Test { 2 public static void main(String[] args 阅读全文
posted @ 2019-12-05 18:03 wf.zhang 阅读(106798) 评论(1) 推荐(1)