-
FEATURED COMPONENTS
First time here? Check out the FAQ!
How can I reference spring beans in a class that implements VariableResolver ?
From the zk essentials tutorials I tried using
Selectors.wireVariables(page, this, Selectors.newVariableResolvers(getClass(), null));
The above code cannot be applied in a class that implements VariableResolver interface.
Any ideas ?
The question is not where ... but when.
ZK provides SpringUtil.getBean(name[, cls]) which is available during an active execution. You can use it from any class to get a spring bean by name, independent of which interface it implements.
Asked: 2021-01-20 05:21:08 +0800
Seen: 13 times
Last updated: Jan 26 '21