java - Check Camel config at load-time? -
we're using spring boot application, camel routing. split routes endpoint "uri" string, testability's sake:
rest("/foo").post().to("direct:foo"); from("direct:foo").process(exchange -> { exchange.getin().setbody(service.dostuff()); exchange.getin().setheader(exchange.content_type, content_type_json); });
however if mis-type 1 of "direct:foo"
strings, don't error until route invoked. i'd able error earlier, part of application's startup process.
obviously using static finals instead of string literals keep mis-typing individual endpoint value, won't situation 1 endpoint doesn't go anywhere, or we're using 1 from
without sending it.
is there way can ask camel verify routes have working to/from endpoints, once spring has finished scanning classpath , building beans?
Comments
Post a Comment