Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/374.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
proguard注释:库类的重复定义[javax.annotation.PostConstruct]_Java_Spring Boot_Proguard - Fatal编程技术网

proguard注释:库类的重复定义[javax.annotation.PostConstruct]

proguard注释:库类的重复定义[javax.annotation.PostConstruct],java,spring-boot,proguard,Java,Spring Boot,Proguard,我尝试在Spring Boot应用程序上启动ProGuard,但出现错误: [proguard] Reading library jar [C:\Program Files\Java\jdk1.8.0_151\jre\lib\rt.jar] [proguard] Note: duplicate definition of library class [javax.annotation.Generated] [proguard] Note: duplicate defini

我尝试在Spring Boot应用程序上启动ProGuard,但出现错误:

  [proguard] Reading library jar [C:\Program Files\Java\jdk1.8.0_151\jre\lib\rt.jar]
     [proguard] Note: duplicate definition of library class [javax.annotation.Generated]
     [proguard] Note: duplicate definition of library class [javax.annotation.PostConstruct]
     [proguard] Note: duplicate definition of library class [javax.annotation.PreDestroy]
     [proguard] Note: duplicate definition of library class [javax.annotation.Resource$AuthenticationType]
     [proguard] Note: duplicate definition of library class [javax.annotation.Resource]
     [proguard] Note: duplicate definition of library class [javax.annotation.Resources]
     [proguard] Note: there were 8 duplicate class definitions.
     [proguard]       (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
     [proguard] Warning: there were 2 classes in incorrectly named files.
     [proguard]          You should make sure all file names correspond to their class names.
     [proguard]          The directory hierarchies must correspond to the package hierarchies.
     [proguard]          (http://proguard.sourceforge.net/manual/troubleshooting.html#unexpectedclass)
     [proguard]          If you don't mind the mentioned classes not being written out,
     [proguard]          you could try your luck using the '-ignorewarnings' option.
     [proguard] Error: Please correct the above warnings first.

为什么会出现此错误以及如何修复它?

尝试忽略类
-dontnote javax.annotation.

阅读更多:

您可以执行以下操作来摆脱这种情况:

  • 如果添加一个proguard选项
    -printconfiguration configuration.txt
    ,您将看到所有的proguard添加
  • 根据您从上述步骤中获得的信息,您可以纠正相同的错误
  • 您可以使用以下选项停止看到这些警告消息:文档

    请看一看问题,以了解有关您目前面临的情况的更多详细信息

    -dontwarn javax.annotation.*
    -dontnote javax.annotation.*