Open eximius313 opened 7 years ago
I think the problem is you need to add the @Component
annotation on the class, not the constructor. If so this should be a feature request to twirl. I'm ok with adding a TwirlKeys.classAnnotations
in Twirl if someone wants to send a PR.
For now I think you'll have to explicitly add the bindings for the twirl templates (or create a component that delegates to it).
well, although I sent two small PRs to play-spring-loader
so far, I don't feel confident enough to send a PR for Twirl....
@eximius313 that's ok. I created a twirl issue. I think it's a good feature so I might submit a PR myself when I find some time.
Although I have added
TwirlKeys.constructorAnnotations += "@org.springframework.stereotype.Component()"
in mybuild.sbt
, when I want to inject my template:it throws: