✅ Lab 2 Java/Spring Boot Version Complete
Created a separate Java version of Lab 2 instead of bilingual approach for better readability and focused learning experience.
Changes Summary
New File: docs/labs/lab-02-requirements-to-code-java.md
- Size: 1,074 lines (complete Java/Spring Boot adaptation)
- Commit: 274b7bc
Updated Files:
lab-02-requirements-to-code.md - Added cross-reference to Java version
docs/labs/README.md - Updated to list both versions
Java/Spring Boot Content
Domain Layer
- Priority enum with
fromString() and fromValue() methods
- Task entity with JPA annotations (
@Entity, @Table, @Column)
- Factory method pattern:
Task.create()
- LocalDateTime for temporal fields
- Proper encapsulation with protected default constructor for JPA
Application Layer
- TaskService interface and TaskServiceImpl
@Service, @Transactional, @Slf4j annotations
- Constructor injection with Lombok's
@RequiredArgsConstructor
- CreateTaskRequest DTO as Java record
- Structured logging with SLF4J
API Layer
- TaskController with
@RestController and @RequestMapping
- POST /api/tasks endpoint
- TaskResponse DTO with
@JsonFormat for dates
@ExceptionHandler for IllegalArgumentException → 400 Bad Request
- Location header in 201 Created response
Testing
- JUnit 5 tests for Task entity
- Mockito for TaskServiceImpl unit tests
@SpringBootTest integration tests with TestRestTemplate
- Test commands:
mvn test, mvn clean test
Developer Experience
- tasks.http file for REST Client extension
- curl examples for manual testing
- Build and run:
mvn spring-boot:run
Design Decision: Separate Files
Chose separate files over bilingual approach because:
✅ Better UX: Participants see only relevant content for their stack
✅ Manageable Size: 871 (.NET) and 1,074 (Java) lines vs 1,500+ bilingual
✅ Easier Maintenance: Clear separation of concerns
✅ Cross-References: Links between versions for comparison
✅ Consistency: Lab 1 uses bilingual for foundational concepts, Labs 2+ use separate files for implementation depth
Epic #16 Progress
With this completion: 5 of 15 issues complete (33%)
Next Steps
Continue with:
Lab 2 ready for Workshop 2.0 with both .NET and Java/Spring Boot support! 🎉
✅ Lab 2 Java/Spring Boot Version Complete
Created a separate Java version of Lab 2 instead of bilingual approach for better readability and focused learning experience.
Changes Summary
New File:
docs/labs/lab-02-requirements-to-code-java.mdUpdated Files:
lab-02-requirements-to-code.md- Added cross-reference to Java versiondocs/labs/README.md- Updated to list both versionsJava/Spring Boot Content
Domain Layer
fromString()andfromValue()methods@Entity,@Table,@Column)Task.create()Application Layer
@Service,@Transactional,@Slf4jannotations@RequiredArgsConstructorAPI Layer
@RestControllerand@RequestMapping@JsonFormatfor dates@ExceptionHandlerfor IllegalArgumentException → 400 Bad RequestTesting
@SpringBootTestintegration tests with TestRestTemplatemvn test,mvn clean testDeveloper Experience
mvn spring-boot:runDesign Decision: Separate Files
Chose separate files over bilingual approach because:
✅ Better UX: Participants see only relevant content for their stack
✅ Manageable Size: 871 (.NET) and 1,074 (Java) lines vs 1,500+ bilingual
✅ Easier Maintenance: Clear separation of concerns
✅ Cross-References: Links between versions for comparison
✅ Consistency: Lab 1 uses bilingual for foundational concepts, Labs 2+ use separate files for implementation depth
Epic #16 Progress
With this completion: 5 of 15 issues complete (33%)
Next Steps
Continue with:
Lab 2 ready for Workshop 2.0 with both .NET and Java/Spring Boot support! 🎉