Running the native image from the spring-native webclient sample leads to this exception:
***************************
APPLICATION FAILED TO START
***************************
Description:
Web application could not be started as there was no org.springframework.boot.web.reactive.server.ReactiveWebServerFactory bean defined in the context.
Action:
Check your application's dependencies for a supported reactive web server.
Check the configured web application type.
org.springframework.boot.web.context.MissingWebServerFactoryBeanException: No qualifying bean of type 'org.springframework.boot.web.reactive.server.ReactiveWebServerFactory' available: Unable to start ReactiveWebServerApplicationContext due to missing ReactiveWebServerFactory bean
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.getWebServerFactoryBeanName(ReactiveWebServerApplicationContext.java:110) ~[webclient:3.0.0-SNAPSHOT]
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.createWebServer(ReactiveWebServerApplicationContext.java:92) ~[webclient:3.0.0-SNAPSHOT]
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.onRefresh(ReactiveWebServerApplicationContext.java:81) ~[webclient:3.0.0-SNAPSHOT]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[webclient:6.0.0-SNAPSHOT]
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[webclient:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:729) ~[webclient:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:428) ~[webclient:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:310) ~[webclient:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[webclient:3.0.0-SNAPSHOT]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290) ~[webclient:3.0.0-SNAPSHOT]
at com.example.webclient.WebClientApplication.main(WebClientApplication.java:18) ~[webclient:0.0.1-SNAPSHOT]
It runs fine with mvn spring-boot:run.
Comment From: wilkinsona
Duplicate of #31534?
Comment From: mhalbritter
Yes, looks like it.