1.springboot代码修改后重启不生效,必须clean后install才生效

原因分析项目是缺少.iml文件,所以导致了必须clean之后再进行install,才能启动
idea终端执行命令mvn idea:module生成iml文件即可解决

2. springboot多模块依赖打包出现找不到xxx.xxx.xx的问题,就算正常打包,运行还是会出现找不到某个程序包的问题。

  1. springboot项目,打包时默认生成两种jar包,一种是普通jar包,一种是可执行jar包。默认情况下,这两种jar的名称相同,在不做配置的情况下,普通的jar先生成,可执行jar后生成,造成可执行jar会覆盖普通的jar。<br /> 当其他依赖引用这个jar包时,不能引用可执行jar包,只能引用普通jar ,所以编译失败:程序包xxx不存在。<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/21774943/1632707681033-d05b268a-f6f4-4558-a6a0-6eea8c2f2d61.png#clientId=ud3aaba99-ac9a-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=324&id=u3a789a29&margin=%5Bobject%20Object%5D&name=image.png&originHeight=324&originWidth=715&originalType=binary&ratio=1&rotation=0&showTitle=false&size=18791&status=done&style=none&taskId=u3870a3df-f62e-4e82-8352-87bd5b892e1&title=&width=715)
  1. <configuration>
  2. <classifier>exec</classifier>
  3. </configuration>
  1. 添加配置后生成两个jar包,其中xxxx-0.0.1-SNAPSHOT-exec.jar为可执行jarxxxx-0.0.1-SNAPSHOT.jar为普通jar包就可以进行正常打包和Install了。

3. Array.set()

  1. public static native void set(Object array, int index, Object value)
  2. throws IllegalArgumentException, ArrayIndexOutOfBoundsException;

这个java本地方法将value填充/覆盖到array指定位置,普通类型数组string[],int[]都可以正常运行,当类型是byte时,方法就会抛出异常 java.lang.IllegalArgumentException: argument type mismatch

4. java命令运行可执行jar包报错xxxx-0.0.1-SNAPSHOT.jar中没有主清单属性

  1. <build>
  2. <plugins>
  3. <plugin>
  4. <groupId>org.springframework.boot</groupId>
  5. <artifactId>spring-boot-maven-plugin</artifactId>
  6. <!-- 加入以下部分到pom.xml文件中,再重新进行打包-->
  7. <executions>
  8. <execution>
  9. <goals>
  10. <goal>repackage</goal>
  11. </goals>
  12. </execution>
  13. </executions>
  14. </plugin>
  15. </plugins>
  16. </build>

5. git拉取常见错误

  1. open ssl错误

    1. git config --global http.sslVerify "false"
  2. timeout错误

点击前往

  1. 正常拉取到一半,或者快要成功时报错 ```basic Cloning into ‘/opt/exploit-database’…

remote: Counting objects: 106517, done.

remote: Compressing objects: 100% (45/45), done.

error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

  1. 一般是由于大文件造成的提交或者拉取失败,curlpostBuffer默认值太小,增大缓存配置就好了
  2. ```basic
  3. git config --global http.postBuffer 1048576000