Back to list
mduongvandinh

spring-maven-modular

by mduongvandinh

Java Spring Skills

3🍴 0📅 Jan 18, 2026

SKILL.md


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"

Maven Modular Architecture

Module Flags

ModuleDefaultProperty
PostgreSQLONmodule.postgresql.enabled
RedisOFFmodule.redis.enabled
KafkaOFFmodule.kafka.enabled
RabbitMQOFFmodule.rabbitmq.enabled
OAuth2OFFmodule.oauth2.enabled

Usage

# 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

Profiles

Minimal Profile

  • PostgreSQL (always)
  • JWT Authentication

Full Stack Profile

  • PostgreSQL
  • Redis
  • Kafka
  • OAuth2

Spring Configuration

Use @ConditionalOnModuleEnabled to conditionally load beans:

@Configuration
@ConditionalOnModuleEnabled("redis")
public class RedisConfig {
    // Only loaded when modules.redis.enabled=true
}

application.yml

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}

Score

Total Score

55/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon