Hi everyone,
I’m upgrading a legacy application from Play 2.4 to 2.5. I’m having an issue with updating the controllers to use DI, particularly the controllers which used to rely on play.api.Play.current. I have added the Application to be injected, and now I end up with this error: Tried proxying play.api.Application to support a circular dependency, but circular proxies are disabled.
From the Googling I’ve done already, I know what is causing the issue, but the solutions provided don’t help. If I try and inject either Environment or Configuration I get: Error injecting constructor, java.lang.RuntimeException: There is no started application and I can’t seem to work out what to inject to get the current application if I can’t inject Application.
Any assistance would be great as I feel I’ve either missed something simple or am doing something silly!
Thanks,
Adam