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
6
votes
2 answers

Is it possible to customize docker image generated with Spring Native (with buildpack)

I'm currently developping a Spring Native application, it's building using paketo buildpack and generating a Docker image. I was wondering if it's possible to customize the generated Docker image by adding third party tools (like a Datadog agent for…
6
votes
0 answers

How can I configure the image created by the bootBuildImage command?

Using Spring Native and Gradle, with bootBuildImage Gradle command: ... bootBuildImage { builder = 'paketobuildpacks/builder:tiny' environment = ['BP_NATIVE_IMAGE': 'true'] imageName = "demo-native" } ... I can create a Docker…
Kambei
  • 458
  • 9
  • 23
5
votes
0 answers

Plugin [id: 'io.spring.dependency-management', version: '1.0.11.RELEASE'] was not found in any of the following sources:

Hello guys I'm new to GraalVM and was trying to start a spring native project following the guide https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/#getting-started-buildpacks. When I tried to sync after I added plugins { id…
eve
  • 51
  • 1
  • 3
5
votes
2 answers

Spring Native 0.9.1-SNAPSHOT fails to start in IDEA

Just generated on https://start.spring.io/ Spring Boot 2.4.4 project with added Spring Boot Native 0.9.1-SNAPSHOT and it fails to start within IDEA (so not yet even as native image) The ApplicationContext could not start as…
Paul Verest
  • 60,022
  • 51
  • 208
  • 332
4
votes
2 answers

Using Springdoc with Spring Boot 3 Native

I am trying to use Springdoc v2 with Spring Boot 3. It works fine when running it with the JVM, but not when running the native binary. The Spring boot project is created like this:…
Sim
  • 482
  • 4
  • 9
4
votes
1 answer

Spring Boot build image failure for native image

Using spring boot 2.6.2, with java17, trying to create native image but it fails with below error. I am building it on windows 11 machine with docker desktop installed mvnw spring-boot:build-image [INFO] [creator] …
Shubham Goel
  • 41
  • 1
  • 3
4
votes
1 answer

Spring Native: How to pass environment variables in at build time

I'd like to use Spring Native in my project. Currently when running the application I pass in environment variables at run-time. I'll need to bake these environment variables into the image at build time instead. Spring Native works fine when I…
Alex
  • 177
  • 12
4
votes
1 answer

Building a Spring Native application on my Docker Image

I am building my spring boot native application on an alpine (openjdk:13-alpine) docker image. ./mvnw spring-boot:build-image -DskipTests When doing this I got an error : [INFO] Building image…
Antoine Grenard
  • 1,712
  • 3
  • 21
  • 41
4
votes
2 answers

Spring boot native enable https during build

I am getting the below error when I tried to use HTTPS in spring native application. java.net.MalformedURLException: Accessing an URL protocol that was not enabled. The URL protocol HTTPS is supported but not enabled by default. It must be enabled…
zeeshan ansari
  • 381
  • 3
  • 16
3
votes
2 answers

Spring Boot 3 native image with Jackson

I'm trying to setup a new application with latest SpringBoot 3 and everything works fine until I try to create and run my application with Native compilation. Just for your reference here is error that I receive from running unit tests: Caused…
Behrad
  • 33
  • 1
  • 4
3
votes
1 answer

How to provide RuntimeHints for Internal Classes in SpringBoot3

I'm trying run a Spring Boot Application with Kotlin Coroutines. When i execute this in JVM Mode everything works as expected, but when i execute as native image i get this error: Stacktrace java.lang.NoSuchMethodException:…
Alex
  • 130
  • 6
3
votes
2 answers

Native Image with Spring Boot 3.0.0 logging trouble

When I start native Image of Spring Boot 3.0.0 spring-boot-starter-web with Docker, it shows strange log messages like this: :: Spring Boot :: (v3.0.0) %PARSER_ERROR[d] %PARSER_ERROR[p] 1 --- [%PARSER_ERROR[t]] %PARSER_ERROR[logger]…
Elmar Brauch
  • 1,286
  • 6
  • 20
3
votes
0 answers

How to Exclude DevTools in Spring Boot Native (GraalVM)

Having a simple Spring Boot application (generated on start.spring.io) with DevTools added as a dependency, if you try to build the native image: ./gradlew nativeCompile You get an executable that if you try to run fails…
Rad
  • 4,292
  • 8
  • 33
  • 71
3
votes
1 answer

spring boot native, error when added dataSource

I am following spring-native getting started guide. I can create a spring boot native image which works fine. But as soon as I add DataSource configuration and a few extra dependencies (spring-boot-starter-data-jpa, ojdbc8), even though it works…
Vishal
  • 774
  • 12
  • 27
3
votes
1 answer

Spring Native - Set Active Profile

I've just built my Spring project using GraalVM native image like so: mvn -Pnative -DskipTests clean package Which gives me a native executable file. When I start it though, it seems like it doesn't have any active profile set. I would like to do…
Andrew Lalis
  • 894
  • 3
  • 15
  • 26
1
2 3
9 10