I have an Spring Boot integration application with Camel-HTTP. Since Camel-HTTP has a dependency to geronimo-servlet
Spring Boot is trying to load the web application context.
How can I force Spring to not load the EmbeddedWebApplicationContext
?
I have tried to exclude all the AutoConfiguration classes found in org.springframework.boot.autoconfigure.web
with the @EnableAutoConfiguration(exclude = ...)
annotation.
You can use the SpringApplicationBuilder class to explicitly disable loading a web environment and context, i.e. in your main class:
public static void main(String[] args) {
new SpringApplicationBuilder(MainConfig.class).web(false).run(args);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With