DEV Community

Cover image for From Scaffolding to Debugging: Spring Boot with GitHub Copilot CLI
Anupam Kushwaha
Anupam Kushwaha

Posted on

From Scaffolding to Debugging: Spring Boot with GitHub Copilot CLI

GitHub Copilot CLI Challenge Submission

This is a submission for the GitHub Copilot CLI Challenge

What I Built

I built a production-ready Spring Boot REST API secured with JWT authentication.

The application includes:

  • User registration and authentication
  • Stateless JWT-based authorization
  • Task management (CRUD operations)
  • Layered architecture (controller, service, repository, entity, DTO)
  • Multi-database support:
    • H2 for local development
    • PostgreSQL for production readiness

This project explores whether GitHub Copilot CLI can act as a real engineering assistant β€” not just a code generator β€” while building a secure backend following real-world Spring Boot best practices.

Demo

πŸ”— Repository:

https://github.com/anupamkushwaha85/copilot-cli-springboot-jwt

Screenshots

Project scaffolding with GitHub Copilot CLI

GitHub Copilot CLI generating the complete Spring Boot project structure, including entities, repositories, services, controllers, and security configuration.

JWT security and service layer generation

Copilot CLI generating JWT authentication, Spring Security filters, service layer logic, and REST controllers using iterative prompts.

Debugging Spring Security (403 Forbidden issue)

Initial 403 Forbidden error when testing authentication endpoints, highlighting a real Spring Security configuration issue.

API testing with Postman

Successful user registration and authentication using JWT tokens.

Protected endpoints in action

JWT-secured task APIs accessed with authenticated requests.

My Experience with GitHub Copilot CLI

GitHub Copilot CLI was used throughout the entire development lifecycle β€” not just for initial scaffolding.

Copilot CLI assisted with:

  • Generating the complete project structure and Maven configuration
  • Creating entities, repositories, services, controllers, and DTOs
  • Implementing JWT authentication and Spring Security configuration
  • Adapting the application for H2 (development) and PostgreSQL (production)
  • Generating documentation alongside the code

Real Debugging with Copilot CLI

One of the most valuable moments was debugging a 403 Forbidden error on the authentication endpoints.

Instead of trial-and-error:

  • Copilot CLI analyzed the Spring Security configuration
  • Identified default form login and HTTP basic auth interference
  • Suggested disabling them explicitly
  • Provided the exact fix in SecurityConfig

This experience showed that Copilot CLI is effective not only for writing code, but also for systematic debugging and root-cause analysis. It significantly reduced setup friction and allowed me to focus on architecture and correctness instead of boilerplate.

Outcome:

A production-ready backend built end-to-end with GitHub Copilot CLI, demonstrating real-world usage beyond code generation.

Top comments (1)

Collapse
 
anupam_kushwaha_85 profile image
Anupam Kushwaha

πŸ‘‹ Thanks for checking out my submission!

This project was built end-to-end using GitHub Copilot CLI as a real development assistant, not just for scaffolding but also for debugging real Spring Security issues (including a 403 Forbidden error on auth endpoints).

I intentionally documented how Copilot CLI helped during failures, environment constraints (Windows + DB setup), and iterative refinement β€” because that’s where the tool really stood out for me.

Happy to answer questions or share more details about the Copilot CLI workflow used here πŸ™‚