Thoughts, stories and ideas.
aldora
  • Home
  • Converter
  • About
  • Archive
Subscribe

Java

spring bean lifecycle

Spring Bean Lifecycle with Executable Code

Lifecycle code example @Component public class LifeCycleDemoBean implements InitializingBean, DisposableBean, BeanNameAware, BeanFactoryAware, ApplicationContextAware { public LifeCycleDemoBean() { System.out.println("## 1. I'm in the LifeCycleBean Constructor"); } /** * {@link BeanNameAware} */ @Override public void setBeanName(String name) { System.out.println("## 2. My Bean Name is: " + name); }
Aldora L Jul 18, 2022

First Initialization and Execution of ObjectMapper.readValue is Slow

I happened to find that first initialization and execution of ObjectMapper.readValue of an application is slow, no matter if I reuse static objectMapper or use new objectMapper instance every time, the first-time cost won't disappear. But overall, static objectMapper is faster than instance. The first execution would
Aldora L Jul 7, 2022

Subscribe to aldora

Don't miss out on the latest news. Sign up now to get access to the library of members-only articles.
aldora © 2025. Powered by Ghost