πŸŽ“ Java Spring Boot Learning Plan

Duration: 3 Days Γ— 2 Hours = 6 Hours Total
Goal: Migrate MobikulApiTransformer from Laravel to Spring Boot

πŸ› οΈ Prerequisites - Install Before Day 1

  1. JDK 17 or 21: Oracle JDK or OpenJDK
  2. Windsurf IDE: Already installed (AI-powered IDE with Java support)
  3. Postman: Download Here
  4. MySQL: Already in XAMPP
  5. Maven: Will be configured in Windsurf

πŸ“… DAY 1: Java Fundamentals & Environment Setup

Hour 1: Introduction to Java (60 min)

Session 1 (30 min): What is Java?

πŸ“Ί Resources:
πŸ‡¬πŸ‡§ Java Tutorial - Programming with Mosh (0:00-30:00)
πŸ‡ΈπŸ‡¦ دورة جافا - Adel Nasim (Ep 1-3)

Session 2 (30 min): Environment Setup

  1. Install JDK β†’ Verify: java -version
  2. Configure Windsurf for Java development
  3. Set JAVA_HOME environment variable
  4. Install Java Extension Pack in Windsurf (if needed)
  5. Create & run HelloWorld.java in Windsurf

Hour 2: Java Syntax & OOP (60 min)

Session 1 (30 min): Java Syntax

πŸ‡ΈπŸ‡¦ أساسياΨͺ جافا - Elzero (Ep 4-8)
πŸ‡¬πŸ‡§ Java Basics - W3Schools

Session 2 (30 min): Object-Oriented Programming

πŸ‡¬πŸ‡§ Java OOP - Mosh
πŸ‡ΈπŸ‡¦ Ψ§Ω„Ψ¨Ψ±Ω…Ψ¬Ψ© Ψ§Ω„ΩƒΨ§Ψ¦Ω†ΩŠΨ©

Practice: Create Product, Customer, and Order classes in Windsurf

πŸ’‘ Windsurf Tip: Use Cascade AI to help you write and debug Java code!

βœ… Day 1 Checklist

πŸ“… DAY 2: Spring Boot Fundamentals

Hour 1: Spring Boot Introduction (60 min)

Session 1 (30 min): Understanding Spring Boot

Laravel vs Spring Boot

FeatureLaravelSpring Boot
Serverphp artisan serveEmbedded Tomcat
ORMEloquentSpring Data JPA
Routesroutes/web.php@RequestMapping
ControllersController@RestController
Config.envapplication.properties
Dependenciescomposer.jsonpom.xml
πŸ‡¬πŸ‡§ Spring Boot - Amigoscode (0:00-30:00)
πŸ‡ΈπŸ‡¦ Spring Boot - Bouali Ali (Ep 1)

Session 2 (30 min): Create Project

  1. Go to start.spring.io
  2. Maven, Java 17/21, Spring Boot 3.2.0
  3. Group: com.mobikul, Artifact: api
  4. Add: Spring Web, JPA, MySQL, Lombok, DevTools
  5. Generate β†’ Extract β†’ Open folder in Windsurf
  6. Windsurf will auto-detect Maven project and download dependencies

Hour 2: Architecture & First API (60 min)

Session 1 (30 min): Three-Layer Architecture

πŸ’‘ Windsurf Advantage: Use Cascade to generate Controller, Service, and Repository classes automatically!

Key Annotations

AnnotationLaravel Equivalent
@RestControllerController class
@GetMappingRoute::get()
@PostMappingRoute::post()
@RequestBody$request->all()
@PathVariable{id} parameter

Session 2 (30 min): Create Hello API

Create controller/HelloController.java with GET and POST endpoints

πŸ’‘ Windsurf Tip: Ask Cascade to create REST endpoints for you!

Run Spring Boot app: Right-click on main class β†’ Run

Test with browser and Postman

πŸ‡¬πŸ‡§ REST API - Telusko
πŸ‡ΈπŸ‡¦ REST API Ψ¨Ψ§Ω„ΨΉΨ±Ψ¨ΩŠ (Ep 3-4)

βœ… Day 2 Checklist

πŸ“… DAY 3: Database Integration & CRUD API

Hour 1: MySQL Integration (60 min)

Session 1 (20 min): Configure Database

  1. Create database: CREATE DATABASE mobikul_db;
  2. Edit application.properties:
    spring.datasource.url=jdbc:mysql://localhost:3306/mobikul_db
    spring.datasource.username=root
    spring.datasource.password=
    spring.jpa.hibernate.ddl-auto=update
    spring.jpa.show-sql=true

Session 2 (40 min): Create Entity & Repository

Entity: @Entity class with @Id, @Column

Repository: Interface extending JpaRepository<Product, Long>

Auto-provides: findAll(), findById(), save(), delete()

πŸ‡¬πŸ‡§ Spring Data JPA - Amigoscode
πŸ‡ΈπŸ‡¦ JPA Ψ¨Ψ§Ω„ΨΉΨ±Ψ¨ΩŠ (Ep 5-6)

Hour 2: Complete CRUD API (60 min)

Create ProductService with methods:

Create ProductController with endpoints:

Test all endpoints with Postman

πŸ’‘ Windsurf Pro Tip: Use Cascade to debug errors and optimize your code!

βœ… Day 3 Checklist

πŸš€ Next Steps After 3 Days

Week 1-2: Practice

Week 3: Authentication

Week 4+: Start Migration

πŸ“š Essential Resources

πŸ‡¬πŸ‡§ English:

πŸ‡ΈπŸ‡¦ Arabic:

πŸ’‘ Quick Reference

Laravel β†’ Spring Boot Mapping

LaravelSpring Boot
Route::get('/api/products')@GetMapping("/api/products")
$request->all()@RequestBody Product product
Product::all()productRepository.findAll()
Product::find($id)productRepository.findById(id)
Product::create($data)productRepository.save(product)
$product->delete()productRepository.delete(product)

πŸ“ How to Save as DOCX:
1. Open this HTML file in Microsoft Word
2. File β†’ Save As β†’ Choose "Word Document (.docx)"
3. Done!