Documentation: clarify that there is no lifecycle support
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 65/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- java
- Domain
- documentation
Research direction
Open the Guice wiki Bindings page referenced in the issue and review its existing lifecycle-related content. Add a clear statement that Guice does not support @PostConstruct or lifecycle callbacks and that this is not planned; the documentation should explicitly communicate the limitation.
Written by the indexing model from the issue text.
Description
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 https://github.com/google/guice/issues/62#issuecomment-115452493
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
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 1.7k
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/guice
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100