Questions tagged [spring-native]

Spring Native supports compiling Spring applications to native images with GraalVM.

Spring Native supports compiling Spring applications to native images with GraalVM.

iIt s new experimental Spring project https://github.com/spring-projects-experimental/spring-native , that was announce in 2021 https://spring.io/blog/2021/03/11/announcing-spring-native-beta and pinned as #1 Dependency option on https://start.spring.io/

146 questions
1
vote
1 answer

CA error when create docker image with spring-native

I'm trying to create my first "native java app" using spring-native. I modify my pom adding this org.springframework.experimental spring-native
1
vote
1 answer

`@PreAuthorize` with spring-native triggers packaging error: `repeated interface: org.springframework.aop.SpringProxy`

I'm trying to build native images for spring-boot apps in a maven multi-module project. As soon as I decorate a @Controller method with @PreAuthorize, native image generation fail with the message below. Following spring-native samples, I tryed both…
ch4mp
  • 6,622
  • 6
  • 29
  • 49
1
vote
1 answer

Spring Native fails to Execute org.graalvm.buildtools

I followed the instructions on Getting Started Native Build Tools in order to create a standalone executable using Spring Native. When I execute the package goal mvn -Pnative -DskipTests package I get the following error (I also get a lot of Could…
jschnasse
  • 8,526
  • 6
  • 32
  • 72
1
vote
1 answer

Create a Spring Native application for another OS

I am building a Spring Native application on a Linux machine. Building an executable that runs on Linux works. How can I build an executable on the same machine that runs natively on Windows? One option would be to create a Docker image, but is…
werner
  • 13,518
  • 6
  • 30
  • 45
1
vote
1 answer

spring native generation with multi module maven application

I am trying to use the native image generation present in the experimental branch of spring boot, and i am having some issues with my multi-module application. I have 2 jars that need to be built and one executable module that includes those 2 jars,…
aciobanu
  • 391
  • 1
  • 4
  • 14
1
vote
1 answer

Webflux + security with spring native - NoClassDefFoundError: WebMvcConfigurer

This is about spring native, I'm facing the same issue in every web flux project I'm working on. I'm not able to generate the native image. Could anyone help please? I'm working on a Mac (Catalina 10.15.6 (19G73)) and using OpenJDK Runtime…
1
vote
1 answer

How to pass absolute path of the kafka trust store location to spring boot native image

I'm trying to use spring-native to create the native image of spring application which is using kafka ssl. But I have an issue to pass the absoulte path of the kafka truststore path. Becuase the native image can't know where the truststore path…
1
vote
1 answer

How do I run the GraalVM native image tracing agent from a Spring Native Gradle project?

I have found information on how to run the GraalVM native image tracing agent from a Spring Native Maven project, but I can't find info on how to do it from a Gradle project. See…
Magnus Larsson
  • 562
  • 5
  • 10
0
votes
0 answers

Spring boot native with graalvm lambda with aws api gateway

I have build the spring boot native application using graalvm . Then I am able to deploy spring boot native executables in aws lambda (Custom runtime Amazon linux). Then I have add the triggers for that lambda using aws apigateway . When I hit the…
0
votes
0 answers

Spring Boot 3 Native build issue - dial tcp lookup timeout

I have followed the official instructions to create a sample project from start.spring.io, in order to build natively a simple project with Spring Boot 3 native support. As per Help.md, I run: mvn spring-boot:build-image -Pnative This presented the…
tasosioan7
  • 19
  • 2
0
votes
0 answers

How do I use property-based urls in OpenFeign in Native/AOT mode without LoadBalancers?

I'm trying to use Spring Cloud OpenFeign (v4.0.2) to create a @FeignClient that uses an url set by a property given in runtime or through Spring Cloud Config. @FeignClient(name = "my-client") public interface MyClient { …
0
votes
0 answers

Issue with Spring Native and GraalVM: "Error: Classes that should be initialized at run time got initialized during image building"

I'm encountering an issue while trying to build a Spring Boot application using GraalVM and Spring Native. I've removed all the logs from my code, but I'm still facing the following error during the image building process: Error: Classes that…
0
votes
0 answers

Spring Cloud Function Actuator Does Not Work In Spring Native

I reviewed the problem and then opened a pull request to spring cloud stream. It was merged upstream and back ported to 4.0.x. So this problem is solved. Pull Request Link : https://github.com/spring-cloud/spring-cloud-stream/pull/2791 I have a…
0
votes
0 answers

Auto Startup Feature of Spring Cloud Function Not Working in Spring Native(in application.yml)

I can consume and produce data from kafka with Spring Cloud Function. Also, for consumers, I do not allow data to be consumed automatically when the service is starting(auto-startup=false). While the project is starting(Smart-Lifecycle), I want the…
0
votes
0 answers

Hazelcast with Spring Boot 3 GraalVM Native NoSuchMethodError

Migrated a Spring Cloud Gateway project to Spring Boot 3.1.2 and the following native configuration { "resources":{ "includes":[ {"pattern":"hazelcast.yaml"} ]} } Configured Hazelcast beans and they are found by GraalVM runtime…