1) Registered my SQL Object API Interface with @UseStringTemplate3StatementLocator
SqlQuery("SELECT value FROM params WHERE key IN ( <keys> )")
Collection<String> selectByKey(@BindIn("keys") List<String> keys)
3) Added the dependency org.antlr.stringtemplate:3.2.1 to my project.
And done!
Notes:
* The parameter at the SQL String must follow the pattern <*>. I tried using :* and it didn't work.
* You must use @BindIn instead of conventional @Bind.
* For those who aren't using Dropwizard (like me), you need to add the depency org.antlr.stringtemplate at version 3. Version 4 removed somes classes and caused this jDBI's feature to crash.
Thanks Steven for the tip!
Hope this help others too.
--
D. Reinert