A collection of custom Spring Boot starters for seamless integration with various services and frameworks.
This repository contains multiple Spring Boot starters that simplify the integration of external services into your Spring Boot applications through auto-configuration.
Location: springboot-starter-collection-starters/spring-boot-starter-jdbc/
A Spring Boot starter for JDBC with AWS Advanced JDBC Wrapper support for enhanced database connectivity.
Features:
- AWS Advanced JDBC Wrapper with failover support
- PostgreSQL driver included
- Environment-based configuration via
JDBC_WRAPPER_SHARED_URL - Utility functions for PostgreSQL database operations
- Spring Boot 3.4.2 compatible
- Java 21 support
Quick Start:
<dependency>
<groupId>com.anode</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>export JDBC_WRAPPER_SHARED_URL="jdbc:aws-wrapper:postgresql://my-cluster.us-east-1.rds.amazonaws.com:5432/mydb"Location: plugin-springboot-starter/
A Spring Boot starter for PF4J (Plugin Framework for Java) that enables plugin-based architecture in your Spring Boot applications.
Features:
- Auto-configuration of PF4J PluginManager
- Automatic plugin loading and starting at application startup
- Configurable plugin directory
- Enable/disable plugin system via configuration
- Spring Boot 3.4.2 compatible
- Java 21 support
Quick Start:
<dependency>
<groupId>com.anode</groupId>
<artifactId>spring-boot-starter-plugin</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>plugins.enabled=true
plugins.pluginsRootFolder=pluginsLocation: b2-springboot-starter/
A Spring Boot starter for Backblaze B2 cloud storage integration.
Features:
- Auto-configuration of Backblaze B2 client
- Simple service layer for file operations (upload, download, delete)
- Configurable timeouts and retry logic
- Support for multiple buckets
- Spring Boot 3.4.2 compatible
- Java 21 support
Quick Start:
<dependency>
<groupId>com.anode</groupId>
<artifactId>spring-boot-starter-b2</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>b2.applicationKeyId=your_key_id
b2.applicationKey=your_secret_key
b2.defaultBucketName=my-bucketWorking example applications are available in the .exemples/ directory:
Location: .exemples/app/ and .exemples/plugin/
A complete example demonstrating:
- Spring Boot REST API with plugin support
- Extension point pattern implementation
- Multi-language greeting plugin with 3 implementations (English, French, Spanish)
- Plugin discovery and loading
- One-command setup and run
Location: .exemples/b2/
A REST API demonstrating:
- File upload to B2 cloud storage
- File download from B2
- File deletion
- Multi-bucket support
- Complete demo workflow
See QUICKSTART.md for a 5-minute guide to get started with the PF4J starter.
This project follows the Spring Boot multi-module pattern:
.
├── pom.xml # Root parent POM
│
├── springboot-starter-collection-dependencies/ # Dependency management
│ └── pom.xml
│
├── springboot-starter-collection-autoconfigure/ # Auto-configuration
│ ├── src/main/java/com/anode/autoconfiguration/
│ │ ├── b2/B2AutoConfiguration.java
│ │ └── plugin/PluginAutoConfiguration.java
│ └── pom.xml
│
├── springboot-starter-collection-b2/ # B2 core module
│ ├── src/main/java/com/anode/b2/
│ │ ├── B2Properties.java
│ │ └── B2Service.java
│ └── pom.xml
│
├── springboot-starter-collection-plugin/ # Plugin core module
│ ├── src/main/java/com/anode/plugin/
│ │ └── PluginsProperties.java
│ └── pom.xml
│
├── springboot-starter-collection-jdbc/ # JDBC core module
│ ├── src/main/java/com/anode/jdbc/
│ │ ├── JdbcEnvironmentPostProcessor.java
│ │ └── JdbcUtils.java
│ └── pom.xml
│
├── springboot-starter-collection-starters/ # Starter modules
│ ├── spring-boot-starter-b2/
│ │ ├── pom.xml
│ │ └── README.md
│ ├── spring-boot-starter-plugin/
│ │ ├── pom.xml
│ │ └── README.md
│ └── spring-boot-starter-jdbc/
│ ├── pom.xml
│ └── README.md
│
├── b2-springboot-starter/ # [Legacy - to be removed]
├── plugin-springboot-starter/ # [Legacy - to be removed]
│
├── .exemples/ # Example applications
│ ├── app/ # PF4J demo application
│ ├── plugin/ # Example plugin
│ ├── b2/ # B2 demo application
│ └── README.md
│
├── QUICKSTART.md # Quick start guide
└── README.md # This file
The project follows a layered architecture:
- Dependencies Module (
springboot-starter-collection-dependencies): Centralized dependency version management - Core Modules (
springboot-starter-collection-b2,springboot-starter-collection-plugin,springboot-starter-collection-jdbc): Business logic and properties - Autoconfigure Module (
springboot-starter-collection-autoconfigure): Spring Boot auto-configuration - Starter Modules (
spring-boot-starter-*): User-facing starters that combine core + autoconfigure
- Java: 21 or higher
- Spring Boot: 3.4.2 or higher
- Maven: 3.6+
From the root directory:
mvn clean installThis will build and install all modules in the correct order:
- Dependencies module
- Core modules (B2, Plugin)
- Autoconfigure module
- Starter modules
# B2 only
cd springboot-starter-collection-starters/spring-boot-starter-b2
mvn clean install
# Plugin only
cd springboot-starter-collection-starters/spring-boot-starter-plugin
mvn clean installimport org.pf4j.PluginManager;
import org.springframework.stereotype.Service;
@Service
public class MyService {
private final PluginManager pluginManager;
public MyService(PluginManager pluginManager) {
this.pluginManager = pluginManager;
}
public void usePlugins() {
List<MyExtension> extensions =
pluginManager.getExtensions(MyExtension.class);
extensions.forEach(MyExtension::doSomething);
}
}import com.anode.b2.B2Service;
import org.springframework.stereotype.Service;
@Service
public class FileService {
private final B2Service b2Service;
public FileService(B2Service b2Service) {
this.b2Service = b2Service;
}
public void uploadFile() throws Exception {
Path file = Paths.get("example.txt");
b2Service.uploadFile(file, "remote-file.txt");
}
}cd .exemples
./build-and-run.shThen test:
curl "http://localhost:8080/api/greet?name=John"cd .exemples/b2
# Configure your B2 credentials in application.properties
mvn spring-boot:runThen test:
curl -X POST "http://localhost:8081/api/files/demo"Each starter includes comprehensive tests:
cd plugin-springboot-starter
mvn testResults: 16 tests - All passing ✓
cd b2-springboot-starter
mvn testResults: 13 tests - All passing ✓
| Property | Type | Default | Description |
|---|---|---|---|
plugins.enabled |
boolean | true |
Enable/disable plugin system |
plugins.pluginsRootFolder |
String | "plugins" |
Root folder for plugins |
| Property | Type | Default | Description |
|---|---|---|---|
b2.enabled |
boolean | true |
Enable/disable B2 integration |
b2.applicationKeyId |
String | null |
B2 Application Key ID (required) |
b2.applicationKey |
String | null |
B2 Application Key (required) |
b2.defaultBucketName |
String | null |
Default bucket for operations |
b2.connectionTimeoutSeconds |
int | 30 |
Connection timeout |
b2.socketTimeoutSeconds |
int | 60 |
Socket timeout |
b2.maxRetries |
int | 3 |
Maximum retry attempts |
b2.userAgent |
String | spring-boot-starter-b2/0.0.1 |
User agent string |
All starters follow Spring Boot's auto-configuration pattern:
- Properties Class:
@ConfigurationPropertiesfor external configuration - Auto-Configuration Class:
@Configurationwith conditional bean creation - Service Layer: High-level service beans for common operations
- META-INF Registration: Auto-configuration registered in
AutoConfiguration.imports
Application Startup
↓
Spring Boot detects AutoConfiguration.imports
↓
Conditional checks (@ConditionalOnProperty, @ConditionalOnClass)
↓
Beans created (Client, Service, etc.)
↓
Ready for injection into your components
- Java Version: 21
- Spring Boot Version: 3.4.2
- Code Style: Standard Java conventions
- Testing: JUnit 5 with Spring Boot Test
- Documentation: Comprehensive README for each module
- Create a new module directory
- Add
pom.xmlwith dependencies - Create configuration properties class
- Create auto-configuration class
- Create service layer
- Add
META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports - Write tests
- Document in README.md
Problem: Plugins not loading
Solutions:
- Check
plugins.enabled=true - Verify plugin directory exists
- Check application logs
- Ensure plugin manifest is correct
Problem: Authentication errors
Solutions:
- Verify credentials are correct
- Check application key hasn't expired
- Ensure key has bucket permissions
See individual starter READMEs for more troubleshooting tips.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Update documentation
- Submit a pull request
- Review plugin code before loading
- Use plugin versioning
- Implement plugin sandboxing if needed
- Monitor plugin behavior
- Never commit credentials to version control
- Use environment variables for production
- Use application keys with minimal permissions
- Rotate keys regularly
- Use private buckets for sensitive data
This project is licensed under the terms specified in the repository.
For issues:
- PF4J Starter: See plugin-springboot-starter/README.md
- B2 Starter: See b2-springboot-starter/README.md
- General: Open an issue in this repository
PF4J Spring Boot Starter:
- Initial release
- Auto-configuration support
- Basic plugin management
- 16 passing tests
B2 Spring Boot Starter:
- Initial release
- Auto-configuration support
- File upload/download/delete operations
- Multi-bucket support
- 13 passing tests
PF4J Starter:
- Plugin hot-reload support
- Plugin dependency management
- Enhanced security features
- Plugin metrics and monitoring
B2 Starter:
- Large file upload support (>5GB)
- File streaming support
- Bucket management operations
- File listing with pagination
- CDN integration
General:
- Spring Boot 3.5+ compatibility
- Reactive programming support
- Cloud-native features (health checks, metrics)
- Additional starters for other services
- Spring Boot team for the excellent framework
- PF4J team for the plugin framework
- Backblaze for B2 cloud storage and SDK
- Contributors and users of these starters
Happy Coding! 🚀