java
Asker.J
嗯
展开
-
JAVA 合并两个List
存在两个List<T>listAlistB如何将两个list合并成一个Plain JAVA List<T> list = Lists.newArrayList(); list.addAll(listA); list.addAll(listB); List<T> list = new ArrayList(listA); list.addAll(listB); new ArrayList<T>(){{ addA原创 2022-04-27 19:00:36 · 16948 阅读 · 1 评论 -
Parameter 0 of constructor in ‘‘ required a bean of type ‘‘ that could not be found.
当出现 如下 问题时:Parameter 0 of constructor in '' required a bean of type '' that could not be found.问题可能出现的原因,是包扫描不对修改两个地方:启动类,扫描包的注解yml文件mybatis-plus.mapper-locations的值启动类@SpringBootApplication@EnableWisecoConfigCenter@ComponentScan(value={"com.w原创 2021-11-03 14:41:33 · 10883 阅读 · 0 评论 -
No property * found on entity class Object to bind constructor paramet
org.springframework.data.mapping.MappingException: No property b found on entity class com.stjy.elastic.domain.es.UserModel to bind constructor parameter to!在项目中,将数据从es映射成java类的过程中,我使用了lambok中建造者的继承模式,如下@Data@SuperBuilder@Document(indexName = UserCons原创 2021-08-06 14:29:36 · 1227 阅读 · 1 评论 -
最最最简单的springboot项目 之 helloworld
最简单的pom配置:可以 spring-boot-dependencies也可以 spring-boot-starter-parent没有多余的依赖!没有多余的依赖!没有多余的依赖!<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-insta原创 2021-05-28 19:00:22 · 123 阅读 · 0 评论 -
maven 命令参数意义
mvn clean install -X -U -PtextColumn 1Column 2clean清空cacheinstall编译+打包 (==complie+packagedeploy推送到远程仓库package打包-U强制从远程仓库更新-Xdebug模式打印日志-P指定profile,是dev还是test等当遇到[WARNING] The POM for com.imles:imles-unipush:jar:gex原创 2021-05-10 15:20:06 · 498 阅读 · 0 评论 -
org.springframework.jdbc.UncategorizedSQLException
总的来说,还是oracle的sql写的不对。习惯mysql的时候对关键字加 ` ,所以操作oracle会报错。其次,oracle的时间函数是SYSDATE,不是NOW().Exception in thread "Thread-120" org.springframework.jdbc.UncategorizedSQLException: ### Error updating database. Cause: java.sql.SQLException: sql injection viol原创 2021-02-20 11:20:23 · 9386 阅读 · 0 评论 -
排错:mount.nfs:access denied by server while mounting
服务器信息:服务器server:192.168.3.12客户端client:192.168.3.13nfs描述:192.168.3.12 和 192.168.3.13 共享一个文件夹 /home/lzgonline/rootfs检查nfs服务器配置:1.权限查看文件夹权限$ ls -lrtdrwxr-xr-x 如果权限不足,会报错: permission denied解决办法: 在服务器server(192.168.3.12)修改权限$ chmod -R 755 /home原创 2020-12-10 15:18:58 · 9573 阅读 · 0 评论 -
javac编译 > java运行 > 找不到或无法加载主类
package com.example.jvm;public class ByteCodeDemo { public static void main(String[] args) { int i = 2, j = 5; i++; ++j; System.out.println(i); System.out.println(j); }}javac编译,只要不是ByteCodeDemo类中有逻辑错误,原创 2020-11-12 14:44:08 · 201 阅读 · 2 评论 -
踩坑《依赖重复引用》——Error processing condition on org.springframework.boot.autoconfigure.web.client.RestTemp
问题描述:在做文件上传功能的时候,上网上搜了一篇博文,就直接把code拷贝下来了,没仔细审查,然后启动的时候报错了。网上搜了很多,但是没有搜到。有一博文讲到可能依赖配置冲突了Then you have a broken jar. That dependency is part of spring-tx which is already included in both spring-boot-starter-jdbc and spring-boot-starter-data-jpa. Remove y原创 2020-10-29 18:38:09 · 5075 阅读 · 2 评论 -
求一个正整数数组中 连续不断的 子元素数组 的最大长度l,要求子数组的和是 >=s 的最小数组。
方法一、二、三是我解这道题心路历程。import com.alibaba.fastjson.JSONObject;import java.util.Arrays;import java.util.List;/** * @description: 大致题意: * 求一个正整数数组中 连续不断的 子元素数组 的最大长度l,要求子数组的和是 >=s 的最小数组。 * @author: Asker * @create: 2020/8/15 10:52 下午 **/public clas原创 2020-08-16 03:41:05 · 101 阅读 · 0 评论