Tagged articles
applicationcontextinitializer
12 articles · Page 1 of 1
The article explains how to protect database passwords and API keys in Spring Boot 3.5.0 by implementing a lightweight, third‑party‑free dynamic decryption component that encrypts values with AES, stores them with a {cipher} prefix, and decrypts them at pre‑refresh using a custom ApplicationContextInitializer.
AESConfiguration SecurityDynamic Decryption
0 likes · 8 min read

This article explains the two core SpringBoot extension points—ApplicationContextInitializer for pre‑startup configuration and ApplicationListener for post‑event handling—detailing their purpose, execution timing, source code, registration methods, ordering control, common use cases, and a side‑by‑side comparison to help developers master SpringBoot's flexible extension mechanism.
ConfigurationJavaSpringBoot
0 likes · 31 min read

This guide explains Spring and Spring Boot's highly extensible architecture by detailing nine core extension points, their injection timing, practical uses, and best‑practice recommendations, enabling developers to customize the container lifecycle from startup to runtime.
BeanFactoryPostProcessorJavaSpring
0 likes · 6 min read

This article explains multiple ways to load JSON configuration into Spring Boot 3 applications, covering command‑line arguments, @PropertySource with custom factories, ApplicationContextInitializer, nested JSON handling, and direct @Bean approaches, complete with code examples and troubleshooting tips.
JSON ConfigurationJavaPropertySource
0 likes · 8 min read

This article demonstrates how to use Spring's ApplicationContextInitializer together with Javassist to intercept class loading in a Spring Cloud environment, modify the bytecode of org.apache.commons.lang3.RandomStringUtils, and record method calls, handling parent‑child container initialization nuances.
AOPBytecode ManipulationJava
0 likes · 5 min read

This article explains two practical approaches for achieving real‑time external configuration refresh in Spring Boot 2.7, covering a custom ApplicationContextInitializer that periodically updates the Environment and a bean‑refresh technique using ContextRefreshedEvent to rebind @ConfigurationProperties, complete with code examples and testing endpoints.
Configuration RefreshRefreshScopeSpring Boot
0 likes · 9 min read

This article explains the core principles of Spring Boot startup configuration, demonstrates how to intervene using ApplicationContextInitializer, SpringApplicationRunListener, ApplicationRunner, and CommandLineRunner, and provides practical optimization techniques to significantly reduce application launch time.
ApplicationRunnerBackendCommandLineRunner
0 likes · 32 min read


IT NiukeApr 15, 2024 · Backend Development
This article walks through the five core Spring Boot extension points—ApplicationContextInitializer, ApplicationListener, Runner, BeanFactoryPostProcessor, and BeanPostProcessor—showing how they are discovered via SPI, where they are invoked in the startup flow, and how to implement and register custom extensions.
BeanFactoryPostProcessorBeanPostProcessorRunner
0 likes · 8 min read

This article explains the five major Spring Boot extension points—ApplicationContextInitializer, ApplicationListener, Runner, BeanFactoryPostProcessor, and BeanPostProcessor—showing how to register custom implementations via SPI, where they are invoked in the startup flow, and providing code examples for each.
BeanFactoryPostProcessorBeanPostProcessorRunner
0 likes · 9 min read

This article explains the five major extension points in Spring Boot—ApplicationContextInitializer, ApplicationListener, Runner, BeanFactoryPostProcessor, and BeanPostProcessor—showing how they are discovered via SPI, where they are invoked during the startup lifecycle, and how to implement custom ones with code examples.
BeanFactoryPostProcessorBeanPostProcessorRunner
0 likes · 9 min read

This article explains the core extension points of Spring Boot—including ApplicationContextInitializer, ApplicationListener, Runner, BeanFactoryPostProcessor, and BeanPostProcessor—showing how they are discovered via SPI, registered in spring.factories, and invoked during the application startup lifecycle.
BeanFactoryPostProcessorBeanPostProcessorRunner
0 likes · 7 min read

This article explains the purpose of ApplicationContextInitializer in Spring Boot, shows how to implement custom conditions and initializers for environment‑specific configuration, and investigates why the initializer may execute twice when Spring Cloud Context is added, leading to bean duplication and port conflicts.
applicationcontextinitializercustom-conditionspring-boot
0 likes · 5 min read
