Dependency Injection into Handlers with Bidi?

I’m new and kinda lost, between components, system, and bidi. I have a Hadoop FileSystem I have wrapped as a component, that I’d like to make usable from a handler in the routes.clj file. The home-routes function takes a single endpoint positional argument. If I modify app-system to make :routes also invoke component/using, how do I get the home-routes function to pick up the my HDFS component?


Your component should be in the endpoint map passed to your routes function, under the key you passed to using.

1 Like

OMG I was staring at the Endpoint record fields and scratching my head, and just realized that runtime dependencies are part of that component map in the start method. Thanks!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.