Senior java

From xuansenpa1/skillrevise · View interactive version

Senior java is an AI agent skill from the GitHub repository xuansenpa1/skillrevise. World-class Java and Spring Boot development skill for enterprise applications, microservices, and cloud-native systems. Expertise in Spring Framework, Spring Boot 3.x, Spring Cloud, JPA/Hibernate, and reactive programming with WebFlux. Includes project scaffolding, dependency management, security i

How to use this skill

Skill file

Senior Java

World-class Java and Spring Boot development skill for enterprise applications, microservices, and cloud-native systems. Expertise in Spring Framework, Spring Boot 3.x, Spring Cloud, JPA/Hibernate, and reactive programming with WebFlux.

Overview

This skill provides production-ready Java and Spring Boot development capabilities through six Python automation tools and comprehensive reference documentation. Whether building enterprise monoliths, microservices architectures, or reactive systems, this skill ensures best practices, scalable architecture, and enterprise-grade security.

What This Skill Provides:

Use this skill when:

Core Value: Save 60%+ time on project scaffolding while ensuring enterprise-grade architecture, security compliance, and performance optimization.

Core Capabilities

Quick Start

Create Spring Boot Project

# Create microservice with PostgreSQL
python scripts/spring_project_scaffolder.py order-service --type microservice --db postgresql

# Create monolith with MySQL and security
python scripts/spring_project_scaffolder.py ecommerce-app --type monolith --db mysql --security oauth2

# Create reactive WebFlux service
python scripts/spring_project_scaffolder.py notification-service --type reactive --db mongodb

Generate JPA Entity

# Generate complete entity stack (entity, repository, service, controller, DTO)
python scripts/entity_generator.py Product --fields "id:Long,name:String,price:BigDecimal,category:String,createdAt:LocalDateTime"

# Generate with relationships
python scripts/entity_generator.py Order --fields "id:Long,customer:Customer,items:List<OrderItem>,total:BigDecimal" --relations "customer:ManyToOne,items:OneToMany"

Analyze Dependencies

# Check for vulnerabilities and updates
python scripts/dependency_analyzer.py pom.xml --check-security

# Generate upgrade report
python scripts/dependency_analyzer.py build.gradle --output report.md

Access Documentation

Key Workflows

1. New Spring Boot Microservice

Time: 30-45 minutes

  1. Scaffold Project - Generate microservice with Spring Boot 3.x, Docker, and CI/CD

```bash

python scripts/spring_project_scaffolder.py inventory-service --type microservice --db postgresql --security jwt

```

  1. Configure Environment - Set up application.yml with profiles (dev, staging, prod)

```bash

cd inventory-service

# Edit src/main/resources/application.yml

# Configure database, security, and service discovery

```

  1. Generate Entities - Create domain model with JPA entities

```bash

python scripts/entity_generator.py Inventory --fields "id:Long,productId:Long,quantity:Integer,warehouse:String"

python scripts/entity_generator.py InventoryMovement --fields "id:Long,inventory:Inventory,quantity:Integer,type:MovementType,timestamp:LocalDateTime"

```

  1. Implement Business Logic - Add service layer logic and validation rules
  1. Add Tests - Generate unit and integration tests

```bash

# Run tests

./mvnw test

./mvnw verify # Integration tests

```

  1. Build and Deploy

```bash

./mvnw clean package -DskipTests

docker build -t inventory-service:latest .

```

See spring-boot-best-practices.md for complete setup patterns.

2. REST API Development

Time: 20-30 minutes per endpoint group

  1. Design API Contract - Define endpoints following REST conventions

```bash

python scripts/api_endpoint_generator.py products --methods GET,POST,PUT,DELETE --paginated

```

  1. Implement Validation - Add Jakarta validation annotations and custom validators
  1. Configure Error Handling - Set up global exception handler with problem details (RFC 7807)
  1. Add OpenAPI Documentation - Configure SpringDoc for automatic API docs
  1. Test Endpoints - Generate integration tests with MockMvc or WebTestClient

See spring-boot-best-practices.md for API design patterns.

3. JPA/Hibernate Optimization

Time: 1-2 hours for complex data models

  1. Analyze Current Queries - Profile repository methods for N+1 problems

```bash

python scripts/performance_profiler.py --analyze-queries src/

```

  1. Optimize Fetch Strategies - Configure lazy/eager loading appropriately
  1. Add Query Hints - Implement entity graphs and query hints for complex queries
  1. Configure Caching - Set up Hibernate second-level cache with Hazelcast or Redis
  1. Implement Pagination - Use Spring Data's Slice or Page for large datasets

See jpa-hibernate-guide.md for optimization patterns.

4. Spring Security Implementation

Time: 1-2 hours

  1. Generate Security Config - Create security configuration for chosen auth method

```bash

python scripts/security_config_generator.py --type jwt --roles ADMIN,USER,MANAGER

```

  1. Configure OAuth2/JWT - Set up token generation, validation, and refresh
  1. Implement RBAC - Add role-based access control to endpoints
  1. Add Method Security - Configure @PreAuthorize and @PostAuthorize annotations
  1. Test Security - Generate security integration tests

See spring-security-reference.md for security patterns.

Python Tools

spring_project_scaffolder.py

Generate production-ready Spring Boot project structures with complete configuration.

Key Features:

Common Usage:

# Microservice with PostgreSQL and JWT security
python scripts/spring_project_scaffolder.py user-service --type microservice --db postgresql --security jwt

# Monolith with MySQL and OAuth2
python scripts/spring_project_scaffolder.py ecommerce --type monolith --db mysql --security oauth2

# Reactive service with MongoDB
python scripts/spring_project_scaffolder.py notification-service --type reactive --db mongodb

# Help
python scripts/spring_project_scaffolder.py --help

entity_generator.py

Generate complete JPA entity stacks with repository, service, controller, and DTO.

Key Features:

Common Usage:

# Basic entity
python scripts/entity_generator.py Customer --fields "id:Long,name:String,email:String"

# Entity with relationships
python scripts/entity_generator.py Order --fields "id:Long,customer:Customer,total:BigDecimal" --relations "customer:ManyToOne"

# Entity with audit fields
python scripts/entity_generator.py Product --fields "id:Long,name:String,price:BigDecimal" --auditable

# Help
python scripts/entity_generator.py --help

api_endpoint_generator.py

Scaffold RESTful API endpoints with validation and documentation.

Key Features:

Common Usage:

# Full CRUD endpoints
python scripts/api_endpoint_generator.py orders --methods GET,POST,PUT,DELETE

# Read-only with pagination
python scripts/api_endpoint_generator.py reports --methods GET --paginated

# Help
python scripts/api_endpoint_generator.py --help

security_config_generator.py

Generate Spring Security configuration for various authentication methods.

Key Features:

Common Usage:

# JWT security with roles
python scripts/security_config_generator.py --type jwt --roles ADMIN,USER

# OAuth2 resource server
python scripts/security_config_generator.py --type oauth2 --issuer-uri https://auth.example.com

# Help
python scripts/security_config_generator.py --help

dependency_analyzer.py

Analyze Maven/Gradle dependencies for vulnerabilities and updates.

Key Features:

Common Usage:

# Analyze Maven project
python scripts/dependency_analyzer.py pom.xml

# Analyze Gradle with security focus
python scripts/dependency_analyzer.py build.gradle --check-security

# Generate markdown report
python scripts/dependency_analyzer.py pom.xml --output report.md

# Help
python scripts/dependency_analyzer.py --help

performance_profiler.py

Profile JVM applications and generate optimization recommendations.

Key Features:

Common Usage:

# Analyze source for performance issues
python scripts/performance_profiler.py --analyze-queries src/

# Profile running application
python scripts/performance_profiler.py --profile http://localhost:8080/actuator

# Generate optimization report
python scripts/performance_profiler.py src/ --output performance-report.md

# Help
python scripts/performance_profiler.py --help

Reference Documentation

When to Use Each Reference

spring-boot-best-practices.md - Spring Boot Patterns

microservices-patterns.md - Microservices Architecture

jpa-hibernate-guide.md - Data Layer

spring-security-reference.md - Security

java-performance-tuning.md - Performance

Best Practices

Quality Standards

Common Pitfalls to Avoid

See spring-boot-best-practices.md for detailed guidelines.

Performance Metrics

Development Efficiency:

Code Quality:

Runtime Performance:

Integration

This skill works best with:

See spring-boot-best-practices.md for CI/CD and automation integration examples.

Composability & Integration

Skill Composition Patterns

This skill receives input from:

This skill provides output to:

Recommended Skill Combinations

Workflow Pattern 1: Microservices Development

senior-architect → senior-java → senior-devops

Use this pattern for designing and deploying microservices with proper architecture review.

Workflow Pattern 2: Full-Stack Feature

senior-java → senior-frontend → senior-qa

Use this pattern for end-to-end feature implementation with backend API, frontend UI, and testing.

Benefits

Time Savings:

Quality Improvements:

Business Impact:

Next Steps

Getting Started:

  1. Run python scripts/spring_project_scaffolder.py my-service --type microservice --db postgresql to create your first project
  2. Review generated structure and customize configuration
  3. Generate entities with python scripts/entity_generator.py

Advanced Usage:

Additional Resources


Documentation: Full skill guide and workflows available in this file

Support: For issues or questions, refer to domain guide at ../CLAUDE.md

Version: 1.0.0 | Last Updated: 2025-12-16 | Status: Production Ready

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.