Skip to content

Documentation: clarify that there is no lifecycle support #1069

@arcuri82

Description

@arcuri82

Hi,
after using Guice for a few weeks, to my surprise today I discovered that Guice has no support for fundamental lifecycle callbacks like @PostConstruct, and there is no intention to add it #62 (comment)

As @PostConstruct is a critical feature when you do field/set injection (no constructor injection), I am now in the situation to be forced to switch to another DI framework (likely Spring or CDI Weld), as Guice's workarounds are far too verbose or error prone (eg, InjectionListener or constructor injection).

It would be great if the documentation of Guice could be updated to clearly state that @PostConstructor is and will not be supported, eg a section called "No Lifecycle Support" under https://github.com/google/guice/wiki/Bindings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions