subcut

How to use controller route defined by subcut in the template

自古美人都是妖i 提交于 2019-12-25 16:00:10
问题 I have a route defined as @com.xyx.abc(str: String) in my routes file. I want to use this route in a template. I tried using <a href="@com.xyx.abc("temp")/> Obviously didn't work. Thanks in advance. 回答1: Reverse routers are generated per package. So, if you have a package called com , a controller called xyx and a method called abc , then you can do this: @com.routes.xyx.abc("temp") Or if it's a more realistic @com.example.MyController.abc(str: String) , then it would be: @com.example.routes

SubCut BindingModule composition

社会主义新天地 提交于 2019-12-08 06:41:02
问题 With SubCut I can define a BindingModule and use modifyBindings to get a new one which can overwrite some bindings and also add new bindings. Is there a utility where instead of saying val module : BindingModule val newModule = module.modifBindings(...) I could instead do something like val mergedModule = merge(module1,module2,module3,...) The reason is I am writing an application with "pluggable" jars - each such jar will have a META-INF/bindings.properties file which will expose the class