بنقرة واحدة
spring-maven-modular
// Maven Modular Architecture with profiles for optional components. Enable/disable modules like Redis, Kafka, RabbitMQ dynamically.
// Maven Modular Architecture with profiles for optional components. Enable/disable modules like Redis, Kafka, RabbitMQ dynamically.
Complete Java Spring Boot skill set for building enterprise applications. Includes modular architecture with optional components: - PostgreSQL database with JPA/Hibernate + Flyway migration - Redis caching (optional) - Kafka/RabbitMQ messaging (optional, choose one) - JWT + OAuth2 authentication (optional OAuth2) - RBAC authorization (optional) - TDD with Mockito - Spec-First Development with OpenSpec
TDD (Test-Driven Development) skill with Mockito for Spring Boot. Guides the Red-Green-Refactor cycle for writing tests first.
Spec-First Development with OpenSpec for Spring Boot. Align on specifications before implementation begins.
| name | spring-maven-modular |
| version | 1.0.0 |
| description | Maven Modular Architecture with profiles for optional components. Enable/disable modules like Redis, Kafka, RabbitMQ dynamically. |
| triggers | ["maven","module","profile","dependency","optional"] |
| Module | Default | Property |
|---|---|---|
| PostgreSQL | ON | module.postgresql.enabled |
| Redis | OFF | module.redis.enabled |
| Kafka | OFF | module.kafka.enabled |
| RabbitMQ | OFF | module.rabbitmq.enabled |
| OAuth2 | OFF | module.oauth2.enabled |
# Minimal (PostgreSQL only)
mvn clean install -Pminimal
# With Redis
mvn clean install -Dmodule.redis.enabled=true
# With Kafka
mvn clean install -Dmodule.kafka.enabled=true
# Full stack
mvn clean install -Pfull-stack
# Custom combination
mvn clean install -Dmodule.redis.enabled=true -Dmodule.kafka.enabled=true
Use @ConditionalOnModuleEnabled to conditionally load beans:
@Configuration
@ConditionalOnModuleEnabled("redis")
public class RedisConfig {
// Only loaded when modules.redis.enabled=true
}
modules:
postgresql:
enabled: true
redis:
enabled: ${MODULE_REDIS_ENABLED:false}
kafka:
enabled: ${MODULE_KAFKA_ENABLED:false}
rabbitmq:
enabled: ${MODULE_RABBITMQ_ENABLED:false}
oauth2:
enabled: ${MODULE_OAUTH2_ENABLED:false}