随笔分类 -  JAVA

上一页 1 2 3 4 5 6 7 8 ··· 19 下一页
JAVA一些常用的方法
摘要:使用mybatis-plus的时候 默认是不会更新空值的数据的 如果要更新 需要在实体类加上注解 @TableField(updateStrategy = FieldStrategy.IGNORED) private Integer test; 阅读全文
posted @ 2022-08-31 17:48 yvioo 阅读(161) 评论(0) 推荐(0)
摘要:使用自带的convert方法 Page pageList = page(page, Wrappers.emptyWrapper()); IPage page1 = pageList.convert(s -> { ProductDto dto = new ProductDto(); BeanUtils 阅读全文
posted @ 2022-08-24 17:23 yvioo 阅读(1315) 评论(0) 推荐(0)
摘要:appid和appkey生成没有固定逻辑,一般根据自己的需求 Md5PwdEncoder类参考: https://www.cnblogs.com/pxblog/p/10528162.html public static void main(String[] args) { PwdEncoder pw 阅读全文
posted @ 2022-07-13 15:53 yvioo 阅读(3286) 评论(0) 推荐(0)
摘要:示例代码 数据库查询方法,可以根据自己整合的框架来写即可 import org.apache.ibatis.annotations.Select; import java.util.List; import java.util.Map; /** * 数据库备份 */ public interface 阅读全文
posted @ 2022-07-08 14:44 yvioo 阅读(2691) 评论(0) 推荐(0)
摘要:依赖处理 先排除Tomcat依赖 ,然后引入undertow依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions 阅读全文
posted @ 2022-06-30 09:17 yvioo 阅读(689) 评论(0) 推荐(0)
摘要:Unable to render this definition The provided definition does not specify a valid version field. Please indicate a valid Swagger or OpenAPI version fi 阅读全文
posted @ 2022-06-29 09:42 yvioo 阅读(3611) 评论(0) 推荐(0)
摘要:有时候我们前端参数名称用的下划线,但是后台接收一般都用驼峰命名,这样就会导致前端参数无法接收到问题 加个配置 spring: jackson: property-naming-strategy: CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES 这样就会自动转换接收 阅读全文
posted @ 2022-06-22 17:23 yvioo 阅读(2213) 评论(0) 推荐(0)
摘要:我们使用 JSON.toJSONString(list); 这种方式 如果字段为空,是不会进行序列化的 如果要序列化空值的话 使用 JSON.toJSONString(list, SerializerFeature.WriteMapNullValue); 其他一些方法 SerializerFeatu 阅读全文
posted @ 2022-06-15 13:59 yvioo 阅读(2206) 评论(0) 推荐(0)
摘要:import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework 阅读全文
posted @ 2022-06-03 20:27 yvioo 阅读(1321) 评论(0) 推荐(0)
摘要:有时候我们给所有页面都显示站点信息,可以直接全局配置ModelMap信息 然后页面就可以直接获取 GlobalConfig.java import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotat 阅读全文
posted @ 2022-06-03 20:14 yvioo 阅读(728) 评论(0) 推荐(0)
摘要:<dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> </dependency> 自定义序列化配置 DemoJsonAdapter.java import com.google.gson. 阅读全文
posted @ 2022-06-02 15:28 yvioo 阅读(1087) 评论(1) 推荐(0)
摘要:有一些包我们maven仓库找不到,那就只能在项目中引入本地jar包文件,但是maven打包的时候会显示没有这个jar包 首先我们把jar包放到resource下的lib文件夹 然后pom文件 <dependency> <groupId>org.apache.commons</groupId> <ar 阅读全文
posted @ 2022-05-17 10:51 yvioo 阅读(467) 评论(0) 推荐(0)
摘要:报错:Failed to parse multipart servlet request; nested exception is java.io.IOException: The temporary upload location [/tmp/tomcat.6348303759597414822. 阅读全文
posted @ 2022-04-29 15:02 yvioo 阅读(799) 评论(0) 推荐(0)
摘要:以下是伪代码,要根据自己的业务自行修改 引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> 阅读全文
posted @ 2022-04-22 22:21 yvioo 阅读(594) 评论(0) 推荐(0)
摘要:无法连接Java VisualVM 插件中心, 因为Zero sized file reported at https://visualvm.java.net/uc/8u40/updates.xml.gz?unique=039f77b95-689f-47b0-96cd-62e51dd66456_be 阅读全文
posted @ 2022-04-05 15:22 yvioo 阅读(499) 评论(0) 推荐(0)
摘要:java.lang.IllegalStateException: The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook at org.apache.poi 阅读全文
posted @ 2022-03-23 15:39 yvioo 阅读(1550) 评论(0) 推荐(0)
摘要:我是idea2018的 与maven3.6.0不兼容 换成 maven3.5.0就好了 阅读全文
posted @ 2022-02-21 10:08 yvioo 阅读(28) 评论(0) 推荐(0)
摘要:yml list: I2,T,G 代码 @Value("#{'${list}'.split(',')}") public List<String> list; 阅读全文
posted @ 2022-02-18 11:20 yvioo 阅读(1129) 评论(0) 推荐(0)
摘要:整合参考: https://www.cnblogs.com/pxblog/p/14445162.html 显示 configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 不显示 configuration: log-im 阅读全文
posted @ 2022-02-16 15:36 yvioo 阅读(1482) 评论(0) 推荐(0)
摘要:使用的maven版本和idea版本不兼容,换成maven3.5的即可 1) No implementation for org.apache.maven.model.path.PathTranslator was bound. while locating org.apache.maven.mode 阅读全文
posted @ 2022-01-26 15:30 yvioo 阅读(846) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 ··· 19 下一页