java maven打包jar 方法参数名变var1,var2之类的无意义参数名怎么办

这是idea 对.class反编译的结果。要想看完整源码,可以使用maven-source-plugin,在pom.xml里配置:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-source-plugin</artifactId>
  <executions>
    <execution>
      <id>attach-sources</id>
      <goals>
        <goal>jar</goal>
      </goals>
    </execution>
  </executions>
</plugin>

然后:

mvn clean package

在target目录下会看到:

  • xx.jar

  • xx-sources.jar

sources.jar就是可读的源码jar

原文地址:https://www.cnblogs.com/azhqiang/p/9149541.html