Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esotericman/spring-factory-bean-bridge
A bridge for registering own factory beans in spring bean container automatically.
https://github.com/esotericman/spring-factory-bean-bridge
java jdbi spring spring-boot
Last synced: 8 days ago
JSON representation
A bridge for registering own factory beans in spring bean container automatically.
- Host: GitHub
- URL: https://github.com/esotericman/spring-factory-bean-bridge
- Owner: esotericman
- License: apache-2.0
- Created: 2023-08-26T11:52:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-27T14:49:02.000Z (about 1 year ago)
- Last Synced: 2024-11-10T12:16:31.625Z (8 days ago)
- Topics: java, jdbi, spring, spring-boot
- Language: Java
- Homepage:
- Size: 83 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring-factory-bean-bridge
![GitHub](https://img.shields.io/github/license/Flmelody/spring-factory-bean-bridge)
![Dynamic XML Badge](https://img.shields.io/badge/dynamic/xml?url=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Forg%2Fflmelody%2Fspring-factory-bean-core%2Fmaven-metadata.xml&query=%2F%2Fmetadata%2Fversioning%2Flatest&logo=apachemaven&logoColor=%23a34b08&label=spring-factory-bean-core&labelColor=%2308a31a)
![Dynamic XML Badge](https://img.shields.io/badge/dynamic/xml?url=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Forg%2Fflmelody%2Fspring-factory-bean-jdbi%2Fmaven-metadata.xml&query=%2F%2Fmetadata%2Fversioning%2Flatest&logo=apachemaven&logoColor=%23a34b08&label=spring-factory-bean-jdbi&labelColor=%2308a31a)This project is aim at registering own proxy objects that with complex step within initialization in spring boot
container.
Using `FactoryBean` implementation, We can register them automatically.## Preface
**minimal Java version 17**
## Supported default
- JDBI repository (use `@JdbiRepositoryScan` and `@SpringBean` annotations)
## Custom yourself
first of all, you must define your `FactoryBean`, then use `@SpringBeanScan` with `factoryBean()`, and `@SpringBean` for
you interface.
Base dependency```xml
org.flmelody
spring-factory-bean-core
1.0.0-RELEASE```
```java
public class YourFactoryBean implements FactoryBean {
// ... some codes
}```
ADD `@SpringBeanScan(factoryBean = YourFactoryBean.class,basePackages = "packages")` in your configuration class
and `@SpringBean` in your proxy class## JDBI quickstart
- Dependency
Maven dependency
```xml
org.flmelody
spring-factory-bean-jdbi
1.0.0-RELEASE```
or Gradle dependency
```groovy
implementation 'org.flmelody:spring-factory-bean-jdbi:1.0.0-RELEASE'
```- Configuration
ADD `@JdbiRepositoryScan(basePackages = "packages")` in your configuration class and `@SpringBean` in your proxy class