Play 2.5.3: Using dependency injection to get configuration values

前端 未结 5 1940
忘了有多久
忘了有多久 2021-02-05 22:59

I\'m trying to migrate a Playframework application from 2.4 to 2.5.3 and I have problems to get values from application.conf file:

Before t

5条回答
  •  余生分开走
    2021-02-05 23:18

    you should try to remove private. use:

    @Inject Configuration configuration;
    

    instead of:

    @Inject private  Configuration configuration;
    

提交回复
热议问题