Tagged articles
DependencyInjection
34 articles · Page 1 of 1
This article provides a line‑by‑line walkthrough of Spring Boot’s startup sequence, from the main method through SpringApplication.run, environment preparation, context creation, bean factory refresh, to the final ApplicationReadyEvent, highlighting key code snippets and common failure points.
ApplicationContextBeanLifecycleDependencyInjection
0 likes · 13 min read

This comprehensive guide explains the purpose, attributes, and usage of Spring MVC, DI, and conditional annotations—including @RequestMapping, @GetMapping, @Autowired, @Scope, @ConditionalOnClass, and more—providing clear examples and code snippets for each.
AnnotationsBackendDependencyInjection
0 likes · 17 min read

This article explains how the Spring @Value annotation can automatically inject configuration values from property files, support default values and SpEL expressions, and streamline environment-specific settings in Spring Boot applications, while also providing practical code examples and usage tips.
@ValueConfigurationDependencyInjection
0 likes · 8 min read

This comprehensive guide explains the most common Spring MVC and Spring Boot annotations—including @RequestMapping, @GetMapping, @Autowired, @Component, @Scope, and conditional annotations—detailing their purposes, configuration attributes, and practical code examples to help Java backend developers write cleaner, more maintainable code.
AnnotationsBackendDependencyInjection
0 likes · 14 min read

This article provides a detailed walkthrough of Spring and Spring Boot's core concepts, explains the bean container refresh process, and enumerates all major extension interfaces—including ApplicationContextInitializer, BeanDefinitionRegistryPostProcessor, BeanFactoryPostProcessor, InstantiationAwareBeanPostProcessor, SmartInstantiationAwareBeanPostProcessor, various *Aware interfaces, @PostConstruct, InitializingBean, FactoryBean, SmartInitializingSingleton, CommandLineRunner, DisposableBean, and ApplicationListener—accompanied by code samples and usage scenarios.
BeanLifecycleDependencyInjectionExtensionPoints
0 likes · 16 min read

This guide explains Java's Service Provider Interface (SPI), detailing its purpose for decoupling implementations, step-by-step project setup, code examples, configuration files, and an in-depth analysis of ServiceLoader's internal mechanisms, enabling developers to create flexible, extensible Java applications.
DependencyInjectionJavaModularDesign
0 likes · 12 min read

This article explains the purpose, usage patterns, and internal mechanics of Spring's @Import annotation, including importing regular classes, ImportSelector implementations, and ImportBeanDefinitionRegistrar implementations, with complete code examples and a discussion of how Spring processes these imports at runtime.
BackendConfigurationDependencyInjection
0 likes · 9 min read

This article presents fifteen useful Spring techniques—including bean retrieval, event handling, custom interceptors, retry mechanisms, global exception handling, startup initialization, bean lifecycle methods, resource cleanup, dynamic configuration injection, conditional bean registration, caching, transaction management, bean loading order, AOP aspects, and conditional bean creation—each illustrated with clear Java code examples.
BackendDependencyInjectionJava
0 likes · 17 min read

In Spring Boot, a class annotated with @Service can act as a web controller if it is discovered by component scanning and carries @RequestMapping (or method‑level mapping) annotations, allowing HTTP requests to be handled just like a traditional @Controller‑annotated bean.
AnnotationsControllerDependencyInjection
0 likes · 7 min read

This article explains Java's built‑in Service Provider Interface (SPI) mechanism, demonstrates how to implement and test SPI with sample code, analyzes its internal workings and limitations, and then shows how Spring extends SPI using spring.factories with comparable examples and source‑code insights.
BackendDependencyInjectionJava
0 likes · 7 min read

This article explains the most frequent SpringBoot BeanCreationException scenarios—including missing beans, duplicate beans, constructor issues, circular dependencies, and bean overriding—provides clear code examples, and offers practical solutions to resolve each problem.
BeanCreationExceptionDependencyInjectionExceptionHandling
0 likes · 7 min read

This article explains how Lombok's @RequiredArgsConstructor can replace repetitive @Autowired field injections in Spring services by generating a constructor for final fields, demonstrates the underlying annotation‑processing mechanism, and provides practical code examples for applying this technique in backend Java projects.
DependencyInjectionLombokRequiredArgsConstructor
0 likes · 8 min read

This article provides a comprehensive explanation of Spring Boot's startup process, detailing each lifecycle extension point, the order of execution, common pitfalls with RPC/MQ/HTTP traffic, and includes runnable code examples to help developers master Spring initialization.
DependencyInjectionJavaLifecycle
0 likes · 15 min read

This article provides an in‑depth explanation of the Spring Boot startup process, enumerates the key extension points, demonstrates their execution order with sample code and logs, and offers practical recommendations for correctly initializing RPC, MQ, and HTTP traffic.
BackendDependencyInjectionJava
0 likes · 15 min read

This article thoroughly explains the Spring Boot startup sequence, detailing each lifecycle extension point, common pitfalls with early RPC, HTTP, and MQ traffic, and provides code examples and answers to eleven critical questions to help developers master Spring initialization and avoid runtime failures.
DependencyInjectionJavaLifecycle
0 likes · 13 min read

This article explains Spring's IoC container architecture, bean definition processing, lifecycle methods, and AOP proxy creation, providing detailed code examples and step‑by‑step descriptions of resource loading, bean instantiation, dependency injection, and interceptor chains.
AOPBeanFactoryDependencyInjection
0 likes · 12 min read

This article explains why a routing framework is essential for Android apps, analyzes TheRouter's source code, and shows how it uses annotation processing and ASM bytecode injection to handle page navigation, parameter injection, and cross‑module method calls in a modular architecture.
ASMAndroidDependencyInjection
0 likes · 27 min read

This article explains how Spring treats @Component and @Configuration annotations, distinguishes their LITE and FULL modes, demonstrates the proxy behavior with concrete code examples, and details the role of ConfigurationClassPostProcessor and CGLIB enhancement in implementing FULL configuration.
@ComponentConfigurationDependencyInjection
0 likes · 15 min read

This article provides a comprehensive overview of the most frequently used Spring and Spring Boot annotations, explaining their purposes, usage scenarios, and includes practical Java code examples for core, MVC/REST, stereotype, data access, scheduling, asynchronous, and testing annotations.
AnnotationsDependencyInjectionJava
0 likes · 13 min read

TheRouter is a Kotlin‑based, full‑stack solution for Android modular development that provides page navigation, cross‑module dependency injection, automatic initialization, dynamic actions, and remote route table updates, offering extensive configuration, code‑free reflection, and tools for migration, debugging, and performance optimization.
AndroidDependencyInjectionDynamicRouting
0 likes · 20 min read

This article provides a detailed overview of the most frequently used Spring annotations—including core, MVC/REST, Boot, stereotype, data access, scheduling, and testing annotations—explaining their purposes, usage rules, and providing Java code examples for each.
AnnotationsDependencyInjectionSpring
0 likes · 13 min read

The Android Chain framework decouples business modules by turning call points into annotated extension points, generating interface‑to‑implementation mappings at compile time, merging them via a Gradle plugin, and exposing them through a runtime singleton that supports priority, dynamic proxies, custom URL protocols, and ProGuard‑safe automatic registration.
AndroidAnnotationProcessingDependencyInjection
0 likes · 8 min read

This article provides a comprehensive overview of the most frequently used Spring annotations, covering core dependency‑injection annotations, MVC/REST mapping, Spring Boot configuration, stereotype components, transaction management, task scheduling, asynchronous execution, and testing support, with clear code examples for each.
AnnotationsBootDependencyInjection
0 likes · 11 min read

This article explains how .NET's Microsoft.Extensions.ObjectPool framework can be used to reuse objects, customize pooling policies, integrate with dependency injection, and extend pooling to collections, StringBuilder, arrays and memory buffers, thereby minimizing garbage‑collection pressure and boosting application throughput.
DependencyInjectionMemoryManagementObjectPool
0 likes · 29 min read

This article explains the JSR‑250 @PostConstruct annotation, its specifications, how Spring implements its lifecycle handling, execution timing, practical code examples, the deprecation in Java 9+, and alternative approaches such as InitializingBean and DisposableBean.
DependencyInjectionJavaLifecycle
0 likes · 10 min read

This article explains how to transform a large Android project into a componentized architecture by modularizing code, configuring Gradle for independent debugging, using ARouter for page navigation and service communication, handling fragment instances, distributing Application lifecycle events, and migrating legacy projects.
ARouterComponentizationDependencyInjection
0 likes · 32 min read

This article introduces the most commonly used Spring framework annotations—including core, MVC/REST, Boot, stereotype, data access, scheduling, and testing annotations—explains their purposes, usage scenarios, and provides Java code examples illustrating how to apply them in typical Spring applications.
AnnotationsDependencyInjectionSpring
0 likes · 12 min read

This article explains how Spring Boot integrates Redis, reveals a common pitfall where different RedisTemplate beans cause null reads despite existing data, and shows how to diagnose and fix the issue by aligning bean types and injection annotations.
DependencyInjectionJavaRedis
0 likes · 7 min read

This article provides a comprehensive overview of the most commonly used Spring Framework annotations, including core, stereotype, Spring Boot, MVC/REST, data access, scheduling, and testing annotations, with explanations and code examples illustrating their usage in Java backend development.
AnnotationsDependencyInjectionJava
0 likes · 12 min read

This article explores Spring’s @Async annotation in depth, detailing its basic usage, underlying proxy creation, pointcut logic, and asynchronous execution, while highlighting common issues such as circular dependencies and inefficient default thread pools, and providing practical solutions like lazy injection and custom executors.
AOPDependencyInjectionSpring
0 likes · 15 min read

This article explains the complete Spring Bean lifecycle—including definition via XML, various initialization methods, three ways to obtain and use a bean, and bean destruction techniques—illustrated with Java code snippets and a diagram for clear understanding.
@BeanDependencyInjectionJava
0 likes · 8 min read

This article explains how Spring registers bean definitions through various mechanisms such as BeanDefinitionRegistryPostProcessor, BeanFactoryPostProcessor, annotations, XML, @Import, ImportSelector and ImportBeanDefinitionRegistrar, using analogies and code examples to illustrate the process.
BeanDefinitionDependencyInjectionJava
0 likes · 13 min read

This article explains the fundamental role of Spring's BeanDefinition as the core data structure that records all bean metadata, compares it to real‑world analogies, lists the key BeanDefinition interface methods, demonstrates registration via annotations and @Bean methods, and shows how to inspect bean definitions at runtime.
AnnotationsBeanDefinitionDependencyInjection
0 likes · 11 min read

The article analyzes a StackOverflowError that occurs during Spring application startup after upgrading to JDK 8, tracing the deep bean‑creation call chain caused by extensive use of @Autowired with MyBatis MapperFactoryBean, and recommends upgrading mybatis‑spring and switching to @Resource to prevent the overflow.
@AutowiredDependencyInjectionJava
0 likes · 9 min read
