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
MockMvc
反驳和奉承,两者都会造成不愉快的交谈——歌德 有时候我们想针对spring的controller进行单元测试,可以使用MockMvc来进行 文档地址:https://docs.spring.io/spring-framework/docs/current/reference/html/testing.html#spring-mvc-test-server 如果是springboot,文档:https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.testing.spring-boot-applications 这里提到需要加上@AutoConfigureMockMvc注解 在这个文档里提到要使用MockMvc,先静态导入这四个类 然后按照这里的例子,依葫芦画瓢写一个,但是不一样的是,我这里返回的数据是json,因此按照这里的文档稍加修改 最终结果: 12345678910111213141516171819202122232425package com.rub...
回收站拦截器
阿谀奉承者的喉咙是一座敞开的坟墓——佚名 基于mybatis-plus的租户拦截器TenantLineInnerInterceptor复制过来拓展 kotlin代码如下: 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721...
vue-cropper
青春是一种持续的陶醉,是理智的狂热。——拉罗什富科 分享一个vue图片裁剪组件 官网:https://github.xyxiao.cn/vue-cropper/ 演示demo:http://github.xyxiao.cn/vue-cropper/example/ 还是很不错的 1. 安装1234# npm 安装npm install vue-cropper# yarn 安装yarn add vue-cropper 如果你没有使用 npm 在线例子vue-cropper + vue.2x 在线例子vue-cropper@next + vue.3x 服务器渲染 nuxt 解决方案 设置为 ssr: false 1234567891011module.exports = { ... build: { vendor: [ 'vue-cropper ... plugins: [ { src: '~/plugins/vue-cropper', ssr: false } ...
ballcat
对所有的人以诚相待,同多数人和睦相处,和少数人常来常往,只跟一个人亲密无间——富兰克林 分享一个简单的项目脚手架 官方文档:http://www.ballcat.cn/ gitee:https://gitee.com/ballcat-projects/ballcat github:https://github.com/ballcat-projects/ballcat 非常好用
