数据库迁移flyway
批评,这是正常的血液循环,没有它就不免有停滞和生病的现象——奥斯特洛夫斯基 数据库迁移可以使用flyway git地址:https://github.com/flyway/flyway 官网地址: https://flywaydb.org
spel获取spring bean
男人创造作品,而女人创造男人——罗曼·罗兰 代码如下: 1234567891011121314151617181920212223242526272829package com.ruben.simplebootimport org.junit.jupiter.api.Testimport org.springframework.beans.factory.BeanFactoryimport org.springframework.beans.factory.annotation.Autowiredimport org.springframework.boot.test.context.SpringBootTestimport org.springframework.context.expression.BeanFactoryResolverimport org.springframework.expression.spel.standard.SpelExpressionParserimport org.springframework.expression.spel.suppo...
获取包装异常中真实异常
没有弄清对方的底细,绝不能掏出你的心来——巴尔扎克 重复调用getCause即可 12345678910111213141516171819202122232425262728package io.github.vampireachao.stream.core.lambda;/** * LambdaInvokeException * * @author VampireAchao ZVerify * @since 2022/9/4 */public class LambdaInvokeException extends RuntimeException { /** * <p>Constructor for LambdaInvokeException.</p> * * @param cause a {@link java.lang.Throwable} object */ public LambdaInvokeException(Throwable cause) { ...
icss
恋爱不是慈善事业,所以不能随便施舍——狄更斯 分享一个css的仓库 https://github.com/chokcoco/iCSS
ics-to-json
我无论作什麽,始终在想着,只要我的精力允许我的话,我就要首先为我的祖国服务。——(苏联)巴甫 昨天提到可以订阅ics,那能不能将ics转json呢?可以试试这个ics-to-json github:https://github.com/cwlsn/ics-to-json 使用: 123456789npm i ics-to-json// 或者cnpm i ics-to-json// 或者pnpm i ics-to-json// 或者yarn add ics-to-json// 或者tyarn add ics-to-json 我这里通过browserify测试: 1cnpm install -g browserify 编写main.js 12const icsToJson = require('ics-to-json')window.icsToJson = icsToJson.default 1browserify main.js -o bundle.js 编写页面 123456789101112<!DOCTYPE html><htm...
节假日补班日历
生存本身是一种徒劳。——《雪国》 地址:https://github.com/lanceliao/china-holiday-calender ics:https://www.shuyz.com/githubfiles/china-holiday-calender/master/holidayCal.ics
MP字段更新策略
看不见河底就不要涉水而过——佚名 之前写过mybatis-plus部分更新 今天分享一个注解式配置的 添加@TableField(updateStrategy = FieldStrategy.IGNORED) 即可在更新时,忽略判空,强制更新 例如: 123456789101112131415161718192021package com.ruben.simpleboot.pojo.po;import com.baomidou.mybatisplus.annotation.*;import com.ruben.simpleboot.pojo.common.BaseRecycleEntity;import lombok.Data;import lombok.EqualsAndHashCode;import java.time.LocalDateTime;/** * UserInfo * * @author VampireAchao * @since 2022/5/21 */@Datapublic class UserInfo{ private Long id; ...
mp分页排序字段转换
竭诚相助亲密无间,乃友谊之最高境界——瓦鲁瓦尔 经常会遇到这种表格: 后端代码演示: 源码地址: https://gitee.com/VampireAchao/stream-query/blob/master/stream-plugin/stream-plugin-mybatis-plus/src/test/java/io/github/vampireachao/stream/plugin/mybatisplus/DatabaseTest.java
stream-core实现枚举校验
同一个美丽而聪慧的人相处,能使人紧张的神经放松,感情变得柔和——巴尔扎尔 引入依赖: 123456<!-- https://search.maven.org/artifact/io.github.vampireachao/stream-query --><dependency> <groupId>io.github.vampireachao</groupId> <artifactId>stream-core</artifactId> <version>1.1.12</version></dependency> 编写代码: 123456789101112131415161718192021222324252627@Testvoid test() { class User { public GenderEnum getGender() { return null; ...
h2 count+orderBy踩坑
过度的爱情追求,必定会降低人本身的价值——培根 mysql里两个都可执行 h2执行第二条会报错 因此不要在h2写count时使用orderBy
