GitHub CopilotJavaCode Style
Java GitHub Copilot Instructions
GitHub Copilot instructions for Java 21: virtual threads, records, sealed types, and modern Spring Boot patterns.
.github/copilot-instructions.md
- Use Java 21 features: virtual threads, records, sealed classes, pattern matching - Apply Spring Boot 3.x conventions for web applications - Use Spring Data JPA with Specification for dynamic queries - Generate constructor injection (never field injection with @Autowired) - Apply DTOs to separate API contracts from JPA entity models - Use Testcontainers for integration tests with real database instances - Enable Spring Boot's built-in observability with Micrometer and OpenTelemetry - Use Spring Security 6 with Lambda DSL for security configuration
How to use with GitHub Copilot
Create `.github/copilot-instructions.md` in your repository. GitHub Copilot uses these to customize suggestions across your whole repo.
#java#spring#copilot#github#coding-rules
Related Rules
TypeScript GitHub Copilot Instructions
GitHub CopilotTypeScript
GitHub Copilot custom instructions for TypeScript: strict types, modern patterns, and team conventions.
Code Style
typescript · copilotCopy Ready
React GitHub Copilot Instructions
GitHub CopilotReact
GitHub Copilot instructions for React: hooks, patterns, and best practices for modern React apps.
Code Style
react · copilotCopy Ready
Next.js GitHub Copilot Instructions
GitHub CopilotNext.js
GitHub Copilot custom instructions for Next.js App Router projects.
Architecture
nextjs · copilotCopy Ready
Swift GitHub Copilot Instructions
GitHub CopilotSwift
GitHub Copilot instructions for Swift: SwiftUI, async/await, and modern iOS development patterns.
Code Style
swift · swiftuiCopy Ready