InjectException on Custom HttpFilters When Upgrading to Play 2.5.12

22 views
Skip to first unread message

Neil Chaudhuri

unread,
Feb 11, 2017, 5:44:05 PM2/11/17
to scaldi
I have a filter defined as follows that works in Play 2.5.9:

class Filters(implicit inj: Injector) extends HttpFilters {
def filters = Seq(inject[GzipFilter])
}

However, after upgrading to Play 2.5.12, I get this:

Unexpected exception[InjectException: Type `com.Filters` should either define default no-arg constructor or one constructor marked with javax.inject.Inject annotation.]

Any ideas on the problem?

Thanks.

Neil Chaudhuri

unread,
Feb 11, 2017, 5:58:08 PM2/11/17
to scaldi
And by the way, I have never had any JSR-330 components, so I never needed the corresponding annotations. The only change I made is the Play upgrade.
Reply all
Reply to author
Forward
0 new messages