'How do I stop an camel route in springboot camel 3.10.0?

Please help how to avoid the camel springboot application shutting down when camelContext.getRouteController().stopRoute(routeId).

error message

application.properties file this is included camel.springboot.main-run-controller=true

pom.xml file this is included

<dependency>   
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-started-web</artifactId>
</dependency>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source