Inject Logger in Wicket Page with Guice

41 views
Skip to first unread message

Sven Reinck

unread,
Feb 15, 2018, 3:13:30 AM2/15/18
to google-guice
Hi there...

I'm trying to inject a java.util.Logger into my Wicket WebPage... But there is a problem... Since only field injection is possible for Wicket pages Guice tries to build a proxy which doesn't work because the Logger needs parameters. The only way I got it to work was with objenesis... But the classname is not correct then so injecting a Logger this way is useless. This should be a so common usecase that I cannot belive this isn't working... Has anyone made it work?
Reply all
Reply to author
Forward
0 new messages