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

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -