Spring + Thymeleaf + ElementProcessor + @autowired not working -
i trying use @autowired within elementprocessor. ( http://www.thymeleaf.org/doc/extendingthymeleaf.html#some-reasons-to-extend-thymeleaf )
@configurable(dependencycheck = true) public class auditlogelementprocessor extends abstractmarkupsubstitutionelementprocessor { @autowired(required = true) documentservice docservice;
but somehow object docservice null. code definetely working. tried ltw , working exact same code(but i'm not allowed use ltw).
do have ideas how can inject service elementprocessor?
thanks!
answer:
found out myself. problem elementprocessor not access services because processors created when needed.
solution: autowire services need in dialect (that creates processors) , pass services parameters processors.
it works way
Comments
Post a Comment