A comprehensive 5-session training program for experienced Java developers transitioning to AI-assisted development with Cursor
This training program is designed for approximately 100 experienced Java developers who are:
- Primarily IntelliJ IDEA users (transitioning to Cursor)
- Familiar with AI concepts but new to AI-enabled IDEs
- Working with Spring Boot, Gradle/Maven, and modern Java (17+)
- Looking to boost productivity with AI-assisted development
Instructor: Ken Kousen
Format: 5 sessions Γ 3 hours each
Materials: Slidev presentations + Markdown labs + Code projects
Duration: 3 hours
Focus: Cursor fundamentals, Spring Boot development, AI modes
Materials:
- π Session 1 Outline
- π Cursor Quick Start for IntelliJ Users
- π Session 1 Slides
- π§ͺ Lab Exercises
- π οΈ Hello Spring Boot Setup
- π PetClinic Exploration Guide
Projects:
- Hello Spring Boot - Code-along project (built from scratch)
- Spring PetClinic - Exploration project (clone from GitHub)
Key Topics:
- Transitioning from IntelliJ to Cursor
- Chat Mode vs Agent Mode
- AI-assisted code generation
- Refactoring with AI
- Test generation
- Code analysis and understanding
Duration: 3 hours
Focus: Android development with Cursor Composer, Jetpack Compose, ViewModels, Room
Materials:
- π Session 2 Outline
- π Session 2 Slides
- π§ͺ Lab Exercises
- π Session 2 README
Projects:
- Task Manager App - Complete solution in
session2-android/TaskManagerApp/ - Now in Android - Exploration project (clone from GitHub)
Key Topics:
- Hybrid workflow: Cursor + Android Studio
- Cursor Composer for multi-file code generation
- Jetpack Compose UI with Material 3
- State management with ViewModels and StateFlow
- Navigation with Compose Navigation
- Room database for persistence
- Hilt dependency injection
- Testing Android apps with AI assistance
Duration: 3 hours
Focus: Extended Thinking, Plan Mode, modular architecture refactoring
Materials:
- π Session 3 Outline
- π Session 3 Slides
- π§ͺ Lab Exercises
Key Topics:
- Agentic coding principles
- Extended Thinking mode for complex problems
- Plan Mode for multi-phase refactoring
- Modular architecture extraction
- Custom slash commands
- Model Context Protocol (MCP) basics
Note: Requires Plan Mode features in Cursor.
Duration: 3 hours
Focus: AI-assisted testing, code review, quality assurance
Materials:
- π Session 4 Outline
- π Session 4 Slides
- π§ͺ Lab Exercises
Key Topics:
- AI test generation strategies
- Unit, integration, and E2E testing
- Code review with AI assistance
- Performance and security testing
- CI/CD integration with quality gates
Note: Extends Session 3 project.
Duration: 3 hours
Focus: Advanced AI agents, Model Context Protocol, multi-agent systems
Materials:
- π Session 5 Outline
- π Session 5 Slides
- π§ͺ Lab Exercises
Key Topics:
- Spring AI Fundamentals
- Retrieval Augmented Generation (RAG)
- Tools & Function Calling
- Legacy Modernization
Note: Requires MCP setup.
cursor-java-training/
βββ README.md # This file
βββ .cursor/
β βββ CURSOR_TRAINING_CONTEXT.md # AI context document
β
βββ session1-spring-boot/ # Session 1 materials
β βββ session1-outline.md # Session outline
β βββ slides.md # Slidev presentation
β βββ slides.pdf # Slidev presentation (PDF)
β βββ labs.md # Lab exercises
β βββ README.md # Session guide
β βββ hello-spring-setup.md # Hello Spring Boot setup guide
β βββ petclinic-guide.md # PetClinic exploration guide
β βββ hello-spring/ # Complete solution project
β
βββ session2-android/ # Session 2 materials
β βββ session2-outline.md # Session outline
β βββ slides.md # Slidev presentation
β βββ android_slides.pdf # Slidev presentation (PDF)
β βββ labs.md # Lab exercises
β βββ README.md # Session guide
β βββ TaskManager/ # Complete solution project
β
βββ session3-agentic/ # Session 3 materials
β βββ session3-outline.md # Session outline
β βββ slides.md # Slidev presentation
β βββ labs.md # Lab exercises
β βββ ecommerce-monolith/ # Starter code
β βββ legacy-app/ # Legacy code for analysis
β
βββ session4-testing/ # Session 4 materials
β βββ session4-outline.md # Session outline
β βββ slides.md # Slidev presentation
β βββ labs.md # Lab exercises
β
βββ session5-agents/ # Session 5 materials
β βββ session5-outline.md # Session outline
β βββ slides.md # Slidev presentation
β βββ labs.md # Lab exercises
β
βββ docs/
β βββ SETUP.md # General setup instructions
β
βββ [General Resources - root level]
βββ cursor-quickstart-for-intellij-users.md
-
Review Materials:
# Clone or navigate to this repository cd cursor-java-training # Read the context document cat .cursor/CURSOR_TRAINING_CONTEXT.md # Review Session 1 materials cat cursor-quickstart-for-intellij-users.md cat session1-spring-boot/session1-outline.md
-
Prepare Slidev Presentation:
# Install dependencies (if not already installed) npm install -g @slidev/cli # Run slides in dev mode slidev session1-spring-boot/slides.md # Export to PDF (optional) slidev export session1-spring-boot/slides.md
-
Set Up Projects:
# Hello Spring Boot - students will create from Spring Initializr # See: hello-spring-setup.md for instructions # Spring PetClinic - clone for exploration git clone https://github.com/spring-projects/spring-petclinic
-
Test Everything:
- Run through all labs yourself
- Verify all Cursor prompts work as expected
- Test both code-along and exploration exercises
-
Install Cursor:
- Download from cursor.sh
- Install for your platform (macOS/Windows/Linux)
- Sign up for an account
-
Install Java:
# Verify Java installation java -version # Should show Java 17 or 21
-
Install Build Tools:
# Gradle (optional, wrapper included in projects) brew install gradle # macOS # Or Maven brew install maven # macOS
-
Install Cursor Extensions:
- Language Support for Java (Red Hat)
- Debugger for Java (Microsoft)
- Spring Boot Extension Pack (VMware)
- Gradle for Java (Microsoft)
-
Review Prerequisites:
- Read: Cursor Quick Start for IntelliJ Users
- Familiarize yourself with Cursor basics
- Follow along with instructor for code-along exercises
- Use session1-spring-boot/labs.md as reference during class
- Ask questions in Chat mode to understand concepts
- Save your work for future reference
- Complete homework exercises in session1-spring-boot/labs.md (Part B)
- Explore Spring PetClinic using the exploration guide
- Practice AI modes (Chat and Agent) with your own projects
- Document learnings for Session 2
- Java: 21
- Spring Boot: 3.5+
- Build Tools: Gradle (Groovy), Maven
- Database: H2 (in-memory), MySQL, PostgreSQL
- Testing: JUnit 5, AssertJ, MockMvc
- Spring Data JPA - Data access
- Spring Web - REST APIs
- Thymeleaf - Server-side templates (PetClinic)
- Bean Validation - Data validation
- Spring Boot DevTools - Development productivity
- Cursor IDE - AI-assisted development
- Slidev - Presentation framework
- Git - Version control
-
Cursor Quick Start for IntelliJ Users
- IntelliJ to Cursor transition guide
- Key differences and similarities
- Workspace concept and multi-window support
- Chat vs Agent modes
- Keyboard shortcuts
-
- Slidev presentation
- Core concepts and demos
- Live coding examples
-
- Part A: Code-along (in-class)
- Part B: Exploration (homework)
- Progressive difficulty
- Comprehensive examples
-
- Project setup instructions
- Spring Initializr configuration
- Pre-built starter (backup)
- Troubleshooting guide
-
- Architecture overview
- Entity relationships
- Repository patterns
- Controller patterns
- Template integration
- Testing strategies
- Cursor Documentation
- Spring Boot Reference
- Spring PetClinic
- Java 17 Documentation
- JUnit 5 User Guide
This course emphasizes:
- Learning by doing with AI assistance
- Understanding AI capabilities and limitations
- Asking the right questions to AI
- Verifying AI suggestions with human judgment
- Progressive complexity from simple to advanced
- Real projects: Hello Spring Boot + Spring PetClinic
- Hands-on exercises: Code-along and exploration
- Modern practices: Java 17+, records, Spring Boot 3+
- Production patterns: Layered architecture, testing, validation
- AI as a Pair Programmer: Not a replacement, but a powerful assistant
- Critical Thinking: Always verify AI-generated code
- Context Matters: Proper prompts lead to better results
- Iterative Learning: Start simple, build complexity gradually
- Tool Selection: Know when to use Chat vs Agent mode
By the end of Session 1, students will be able to:
- β Navigate Cursor IDE confidently (coming from IntelliJ)
- β Use Chat Mode for learning and understanding
- β Use Agent Mode for code generation and refactoring
- β Manage multiple windows and workspaces
- β Leverage terminal integration
- β Create Spring Boot projects with AI assistance
- β Generate REST controllers and services
- β Implement JPA entities and repositories
- β Add validation and error handling
- β Use modern Java features (records, etc.)
- β Refactor code with AI suggestions
- β Generate comprehensive tests (unit + integration)
- β Apply best practices and design patterns
- β Analyze existing codebases effectively
- β Understand Spring PetClinic architecture
- β Trace request flows through layers
- β Analyze entity relationships
- β Identify performance considerations
- β Compare architectural approaches
After Session 1, you should be comfortable:
- Creating Spring Boot projects from scratch with Cursor
- Using Chat mode to understand concepts
- Using Agent mode to generate and modify code
- Reading and analyzing complex Java codebases
- Writing tests with AI assistance
- Refactoring code effectively
You should have completed:
- All code-along exercises (Labs 1-5)
- Setup verification (Lab 0)
- At least the initial PetClinic exploration (Lab 6)
Optional achievements:
- Complete PetClinic deep dive (Lab 7)
- Attempt advanced challenges (Lab 8)
- Apply learnings to personal projects
Successful session indicators:
- All students have working Hello Spring Boot project
- Most students complete code-along exercises
- Students understand Chat vs Agent decision-making
- Questions demonstrate engagement with AI concepts
- Students can independently use Cursor for basic tasks
Common challenges to address:
- IntelliJ muscle memory β Cursor keyboard shortcuts
- Over-reliance on AI without verification
- Prompt engineering (asking right questions)
- Context window management
- Choosing appropriate AI mode
- Problem: Cursor won't start
- Solution: Check system requirements, reinstall if needed
- Problem: Wrong Java version
- Solution: Use SDKMAN or update JAVA_HOME
- Problem: Spring Initializr fails
- Solution: Use pre-built starter from
hello-spring-setup.md
- Problem: Java support not working
- Solution: Reinstall Java extensions, restart Cursor
- Problem: AI responses seem wrong
- Solution: Improve prompts, add context, verify with documentation
-
During Class:
- Ask instructor
- Use Chat mode to understand errors
- Check troubleshooting sections in guides
-
After Class:
- Review lab documentation
- Check Cursor documentation
- Experiment with different prompts
- Apply to personal projects
Part 1: Setup & Foundations (60 min)
- 00:00 - 00:15: Welcome & Overview
- 00:15 - 00:30: Cursor Quick Start (from IntelliJ)
- 00:30 - 00:45: Setup Verification (Lab 0)
- 00:45 - 01:00: Creating Hello Spring Boot (Lab 1)
Break (10 min)
Part 2: Building with AI (70 min)
- 01:10 - 01:25: Adding Service Layer (Lab 2)
- 01:25 - 01:55: Adding Persistence (Lab 3)
- 01:55 - 02:20: Code Quality & Refactoring (Lab 4)
Break (10 min)
Part 3: Testing & Exploration (60 min)
- 02:30 - 02:50: Test Generation (Lab 5)
- 02:50 - 03:05: Introduction to PetClinic (Lab 6)
- 03:05 - 03:20: PetClinic Guided Exploration
- 03:20 - 03:30: Wrap-up & Homework Assignment
- Complete all homework exercises
- Explore Spring PetClinic in depth
- Practice with personal projects
- Document learnings and questions
- Review Session 1 materials
- Experiment with advanced Cursor features
- Read ahead for Session 2 topics
- Prepare questions for next session
- Master AI-assisted development workflow
- Apply learnings to production projects
- Share knowledge with team
- Contribute to best practices
- Share your experiences using Cursor
- Report any issues with course materials
- Suggest improvements or additional topics
- Adapt materials to your teaching style
- Share successful exercises or examples
- Contribute improvements to materials
This project is licensed under the MIT License - see the LICENSE file for details.
These materials are provided for educational purposes under the MIT License, which allows:
You may:
- Use these materials for teaching
- Adapt them to your needs
- Share with students and colleagues
- Use in commercial projects
- Modify as needed
Please:
- Include the original copyright notice
- Include the license text
- Report issues or improvements (appreciated but not required)
Ken Kousen
- 30+ years Java experience
- 15+ years IntelliJ user
- Author of multiple technical books
- Speaker at conferences worldwide
- Passionate about developer productivity
- Spring Team - For Spring Boot and PetClinic
- Cursor Team - For the amazing AI-powered IDE
- Java Community - For continuous innovation
- Students - For feedback and engagement
Ready to boost your Java development with AI?
Let's get started! π