Taller Spring Security

A course platform REST API built with Spring Boot 4 and Java 25. The current baseline is intentionally unsecured; authentication and authorization are the next step.

Java 25Spring Boot 4.1.1Spring Data JPAH2MapStructMaven
View source on GitHub Read the full README

What it does

Instructors publish courses, students enroll, and paid course content should only be visible to enrolled students. Users can hold several roles (ROLE_ADMIN, ROLE_INSTRUCTOR, ROLE_STUDENT).

Architecture

Feature packages (internal/appuser, internal/course), each layered as controller → usecase → service → DAO interface → JPA implementation. MapStruct converts between JPA entities and API DTOs. Cross-cutting web configuration and domain exceptions live in config/web and internal/common.

Stack and infrastructure

AreaStatusDetails
PersistenceSQLH2 in-memory, JPA/Hibernate, schema and seed data created on start
MessagingNot usedNo broker or events
CloudNot usedRuns locally
DockerNot usedNo Dockerfile or compose file; port 8080

Run it locally

git clone https://github.com/josesaid/taller-spring-security.git
cd taller-spring-security
./mvnw spring-boot:run

# Then
curl -s http://localhost:8080/course/v1/course

Requires JDK 25. H2 console: http://localhost:8080/h2-console (JDBC URL jdbc:h2:mem:taller, user sa).

Endpoints

MethodPathPurpose
GET/course/v1/coursePublished catalog
GET/course/v1/course/{id}One published course
GET/course/v1/course/{id}/contentPaid course content
GET/course/v1/course/mineEnrolled courses
POST/course/v1/courseCreate course
PUT/course/v1/course/{id}Update course
POST/course/v1/course/{id}/enrollEnroll
GET/user/v1/user/meCurrent user profile
GET/user/v1/userList users
PUT/user/v1/user/{id}/rolesReplace roles

Roadmap