随笔分类 - JAVA
JAVA一些常用的方法
摘要:org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of `java.util.ArrayList` out of STAR
阅读全文
摘要:private static Pattern pattern = Pattern.compile("[\u4E00-\u9FA5|\\!|\\,|\\。|\\(|\\)|\\《|\\》|\\“|\\”|\\?|\\:|\\;|\\【|\\】]"); /** * 字符串是否包含中文 * * @para
阅读全文
摘要:An attempt was made to call the method net.sf.jsqlparser.schema.Column.withColumnName(Ljava/lang/String;)Lnet/sf/jsqlparser/schema/Column; but it does
阅读全文
摘要:POST 索引名称/_update_by_query { "query": { "bool": { "must_not": { "exists": { "field": "updateTime" } } } }, "script":"ctx._source.updateTime=ctx._sourc
阅读全文
摘要:ES使用reindex命令从不同服务器之间迁移数据: https://www.cnblogs.com/pxblog/p/17919065.html 用的es版本是6.5.x POST _reindex { "source": { "index": "现有的索引名称", "size":1000, "q
阅读全文
摘要:在Maven打包的时候可以使用YUI Compressor(压缩CSS/JS)文件,使用yuicompressor-maven-plugin插件进行压缩后会减小体积,提高请求速度。 <build> <plugins> <!-- YUI Compressor (CSS/JS压缩) --> <plugi
阅读全文
摘要:引入依赖 <dependency> <!-- this is needed or IntelliJ gives junit.jar or junit-platform-launcher:1.3.2 not found errors --> <groupId>org.junit.platform</g
阅读全文
摘要:一个项目下创建两个模块 在hello-springboot-starter的项目pom.xml引入hello-springboot-starter-autoconfigure的依赖 其他什么都不需要写 hello-springboot-starter-autoconfigure的pom依赖根据自己需
阅读全文
摘要:使用mybatis-plus的时候 默认是不会更新空值的数据的 如果要更新 需要在实体类加上注解 @TableField(updateStrategy = FieldStrategy.IGNORED) private Integer test;
阅读全文
摘要:使用自带的convert方法 Page pageList = page(page, Wrappers.emptyWrapper()); IPage page1 = pageList.convert(s -> { ProductDto dto = new ProductDto(); BeanUtils
阅读全文