Guice call init method after instantinating an object

前端 未结 8 1180
半阙折子戏
半阙折子戏 2020-11-28 06:21

Is it possible to tell Guice to call some method (i.e. init()) after instantinating an object of given type?

I look for functionality similar to @PostConstruct annot

8条回答
  •  眼角桃花
    2020-11-28 07:14

    I like http://code.google.com/p/mycila/wiki/MycilaGuice. This supports Guice 3, other than http://code.google.com/p/guiceyfruit.

提交回复
热议问题