- Jakarta EE Cookbook
- Elder Moraes
- 60字
- 2025-02-26 04:14:00
There's more...
The init() behavior seems similar to @PostConstruct, but this last one is executed before init(), so keep this in mind when using both.
@PostConstruct is executed right after the default constructor.
Be careful when using the destroy() method and avoid holding a memory reference; otherwise, you can mess up the servlet life cycle and run into memory leaks.