2

With Spring Boot 2 and its experimental native support I used to have @NativeHint(options = "--enable-https") at the top of my application's "main" class to tell it to enable https support in the GraalVM image.

It seems in Spring Boot 3/Spring 6 that annotation has been removed and I can not figure out how to achieve the same behavior. I've looked through https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html and haven't found anything in there either.

I tried creating a RuntimeHintsRegistrar bean, but the RuntimeHints class doesn't seem to have anything in there that seems appropriate.

Eric
  • 362
  • 1
  • 4
  • 15
  • 2
    You shouldn't need to do anything as `spring-web` now contains [Graal configuration metadata to enable HTTPS by default](https://github.com/spring-projects/spring-framework/blob/main/spring-web/src/main/resources/META-INF/native-image/org.springframework/spring-web/native-image.properties) – Andy Wilkinson Mar 17 '23 at 10:00
  • Thank you! If you'd like to add that as an answer I will accept it. – Eric Mar 17 '23 at 14:02

1 Answers1

2

@Andy Wilkinson posted the answer in comments:

You shouldn't need to do anything as spring-web now contains Graal configuration metadata to enable HTTPS by default

Eric
  • 362
  • 1
  • 4
  • 15