Tag

FactoryBean

0 views collected around this technical thread.

Java Tech Enthusiast
Java Tech Enthusiast
Aug 5, 2024 · Backend Development

Implementing SPI-like Extensions in Spring Boot

Spring Boot can emulate SPI plug‑in extensions by using native Java ServiceLoader, conditional bean registration with @ConditionalOnClass/@ConditionalOnProperty, custom FactoryBean implementations, or programmatic BeanDefinitionRegistryPostProcessor registration, each enabling dynamic service loading based on configuration or runtime conditions.

FactoryBeanJavaSPI
0 likes · 7 min read
Implementing SPI-like Extensions in Spring Boot
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 23, 2024 · Backend Development

Why Your Custom Spring Advisor Fails and How to Fix It in Spring Boot 3.2

This article explores why a custom Advisor aspect may not work in Spring Boot 3.2, demonstrates how enabling @EnableAspectJAutoProxy and adjusting bean roles resolves the issue, and also covers advanced topics such as FactoryBean type conversion, version retrieval, SpringProperties, and the Spring SPI mechanism.

AOPAdvisorFactoryBean
0 likes · 8 min read
Why Your Custom Spring Advisor Fails and How to Fix It in Spring Boot 3.2
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 10, 2024 · Backend Development

Master Spring’s FactoryBean: From Basics to Advanced Use Cases

This article explains Spring's FactoryBean interface, detailing its three core methods, and provides step‑by‑step examples—including a simple bean, prototype scope, proxy creation, accessing the original FactoryBean, and using ServiceFactoryBean for SPI—illustrating how to customize bean instantiation in Spring 6.

FactoryBeanJavaProxy
0 likes · 7 min read
Master Spring’s FactoryBean: From Basics to Advanced Use Cases
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 25, 2023 · Backend Development

Understanding Spring’s FactoryBean and MyBatis Integration: From BeanFactory to MapperFactoryBean

This article explains how Spring’s FactoryBean mechanism enables seamless integration with MyBatis by detailing the roles of BeanFactory, SqlSessionFactoryBean, MapperScannerConfigurer, and MapperFactoryBean, and provides annotated code examples and XML configuration to illustrate the underlying process and its benefits for transaction management and thread safety.

FactoryBeanIntegrationJava
0 likes · 13 min read
Understanding Spring’s FactoryBean and MyBatis Integration: From BeanFactory to MapperFactoryBean
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 12, 2023 · Backend Development

Mastering Spring’s ObjectFactory and FactoryBean: When and How to Use Them

This article explains the differences between Spring's ObjectFactory and FactoryBean interfaces, shows how they are applied in bean creation, servlet API injection, and custom implementations, and provides code examples and best‑practice tips for resolving bean ambiguities in a Spring backend.

FactoryBeanJavaObjectFactory
0 likes · 10 min read
Mastering Spring’s ObjectFactory and FactoryBean: When and How to Use Them
macrozheng
macrozheng
May 6, 2022 · Backend Development

Master Spring Bean Injection: XML, Annotations, FactoryBean & RegistryPostProcessor

Explore multiple Spring bean injection techniques—including XML configuration, annotation-driven @Configuration/@Bean, @Import, FactoryBean, and BeanDefinitionRegistryPostProcessor—through clear explanations, code samples, and practical examples, highlighting their advantages, drawbacks, and how to integrate them into a Spring application.

BackendBeanDefinitionRegistryPostProcessorFactoryBean
0 likes · 10 min read
Master Spring Bean Injection: XML, Annotations, FactoryBean & RegistryPostProcessor
Zhuanzhuan Tech
Zhuanzhuan Tech
Apr 6, 2022 · Backend Development

Design and Implementation of an Annotation‑Based HTTP Client in Spring

This article presents a design pattern for a unified, annotation‑driven HTTP client in a Spring‑based payment system, detailing custom annotations, dynamic proxy enhancement, and bean registration via FactoryBean and ImportBeanDefinitionRegistrar, with complete code examples and a summary of key concepts.

AnnotationsDynamic ProxyFactoryBean
0 likes · 16 min read
Design and Implementation of an Annotation‑Based HTTP Client in Spring
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 29, 2021 · Backend Development

Master Spring’s ObjectFactory & FactoryBean: Real-World Usage

This article explains the differences between Spring’s ObjectFactory and FactoryBean interfaces, demonstrates how they are used internally for bean creation, dependency injection, and servlet API injection, and shows how to customize ObjectFactory behavior to resolve bean conflicts and inject specific implementations.

FactoryBeanJavaObjectFactory
0 likes · 9 min read
Master Spring’s ObjectFactory & FactoryBean: Real-World Usage
Selected Java Interview Questions
Selected Java Interview Questions
Feb 24, 2020 · Backend Development

Understanding BeanFactory, ApplicationContext, and FactoryBean in Spring

This article explains the roles of BeanFactory and ApplicationContext in Spring, compares BeanFactory with FactoryBean, and provides detailed code examples showing how to configure and retrieve beans, including custom FactoryBean implementations and the use of '&' to access the FactoryBean itself.

BackendBeanFactoryFactoryBean
0 likes · 16 min read
Understanding BeanFactory, ApplicationContext, and FactoryBean in Spring
Java Captain
Java Captain
Apr 10, 2018 · Backend Development

Deep Dive into Spring Framework: IOC Container, BeanFactory, Bean Loading, and FactoryBean

This article provides an in‑depth exploration of Spring's core concepts—including the IOC container, ApplicationContext vs BeanFactory, bean instantiation lifecycles, and the role of FactoryBean—supplemented with diagrams and source code excerpts to help Java developers understand the framework's inner workings.

BackendBeanFactoryFactoryBean
0 likes · 16 min read
Deep Dive into Spring Framework: IOC Container, BeanFactory, Bean Loading, and FactoryBean