davsclaus commented on code in PR #8162:
URL: https://github.com/apache/camel-quarkus/pull/8162#discussion_r2697462637
##########
extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMain.java:
##########
@@ -99,6 +103,21 @@ public MainConfigurationProperties
getMainConfigurationProperties() {
return mainConfigurationProperties;
}
+ @Override
+ protected void configureRoutes(CamelContext camelContext) throws Exception
{
+ if (camelContext.isSourceLocationEnabled()) {
+ for (RoutesBuilder route :
getMainConfigurationProperties().getRoutesBuilders()) {
+ if (route instanceof ResourceAware ra && ra.getResource() ==
null) {
+ Resource resource =
ResourceHelper.resolveResource(camelContext, "source:" +
route.getClass().getName());
+ if (resource != null && resource.exists()) {
+ ra.setResource(resource);
+ }
+ }
+ }
+ }
Review Comment:
Ah yeah so if you add those route builder directly in java code - yeah that
would be good to have in core as well
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]