Spring Boot-native-image-applicaties

In dit artikel leest u hoe u Spring Cloud-Azure-bibliotheken kunt inschakelen voor gebruik met systeemeigen Spring Boot-installatiekopietoepassingen.

Zie Introducing GraalVM Native Images in de Spring-documentatie voor meer informatie over het gebruik van Spring Cloud Azure-bibliotheken in Spring Boot native-image-applicaties.

Azure SDK JAR's zijn ondertekend. Spring Boot biedt echter geen ondersteuning voor verificatie van JAR-handtekeningen voor native images.

Als u dit probleem wilt oplossen, moet u de VERIFICATIE van de JAR-handtekening uitschakelen, zoals beschreven in dit artikel.

VERIFICATIE van JAR-handtekening uitschakelen

Gebruik de volgende stappen om handtekeningverificatie uit te schakelen:

  1. Maak een custom.security-bestand in src/main/resources met de volgende inhoud:

    jdk.jar.disabledAlgorithms=MD2, MD5, RSA, DSA
    
  2. Als u Maven gebruikt, voegt u de volgende configuratie toe:

    <plugin>
        <groupId>org.graalvm.buildtools</groupId>
        <artifactId>native-maven-plugin</artifactId>
        <configuration>
            <buildArgs>
                <arg>-Djava.security.properties=src/main/resources/custom.security</arg>
            </buildArgs>
        </configuration>
    </plugin>
    

    Als u Gradle gebruikt, voegt u de volgende configuratie toe:

    graalvmNative {
      binaries {
        main {
          buildArgs('-Djava.security.properties=' + file("$rootDir/custom.security").absolutePath)
        }
      }
    }