04 2022 档案
摘要:1.对于list集合的使用: ListUtils<UserVO> utils = BeanUtils.instantiate(ListUtils.class);List<UserEntity> userList = userDAO.getUseByListID(params);List<UserVO
阅读全文
摘要:实体类加入lombok后,有时候我们会用到@Builder注解,这样不需要写太多的set方法来定义属性内容,使我们的代码更加优雅。实体类一旦加上@Builder注解会导致我们mybatis映射数据库字段出问题 问题如下org.springframework.dao.DataIntegrityViol
阅读全文
摘要:private static Pattern humpPattern = Pattern.compile("[A-Z]"); // 将驼峰命名转为下划线名称public static String humpToLine(String str) { Matcher matcher = humpPatt
阅读全文
摘要:依赖工具包 <dependencies> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>5.3.5</version> </dependency></dependencie
阅读全文
摘要:/** * @author zxy * @description: TODO * @date 2022/4/15 */@Configurationpublic class JacksonConfig { @Bean @Primary @ConditionalOnMissingBean(ObjectM
阅读全文
摘要:mybatis-plus resultType映射map 转驼峰 resultType 为map的情况key不是驼峰mapperList<Map<String, String>> getUser(@Param("startDate") String startDate, @Param("endDat
阅读全文