Skip to content

Backend Java Development

Modern Java and Spring Boot, production ready.

Learn modern Java (17–21), SQL, and Spring Boot to build secure, tested REST APIs, then add caching, messaging and microservice patterns. Ends with a capstone backend you can deploy and show.

01Core Java

The language, done well.

  1. Syntax, types & control flowJava is a statically typed language: every variable has a type that the compiler checks before the program runs. Source files are compiled to bytecode, which the JVM runs on any operating system.12 min
  2. OOP: classes, interfaces, inheritance, compositionObject-oriented Java models a domain as classes that bundle state and behaviour. Interfaces define what an object can do, and polymorphism lets one call work on many types.11 min
  3. Exceptions & genericsExceptions signal that something went wrong and let you handle it in one place. Generics let classes and methods work with any type while the compiler still checks type safety.11 min
  4. Collections frameworkThe collections framework gives ready-made lists, sets, maps and queues. Choosing the right one is mostly about access pattern, ordering and the Big-O cost of the operations you use most.12 min
  5. Lambdas, streams & OptionalLambdas are short anonymous functions, and streams chain them into readable data pipelines. Optional makes a possibly missing value explicit instead of returning null.10 min
  6. Modern Java: records, sealed types, pattern matchingJava 17 to 21 added records, sealed types and pattern matching. Together they cut boilerplate and let the compiler check that every case of a type hierarchy is handled.12 min
  7. Concurrency, executors & virtual threadsConcurrency lets a program do several things at once, but shared mutable state can cause race conditions. Java offers locks, atomics, executors, CompletableFuture and, since Java 21, cheap virtual threads.12 min
  8. JVM memory & garbage collection basicsThe JVM splits memory into the heap for objects, a stack per thread for method calls, and metaspace for class data. The garbage collector frees heap objects that nothing references any more.12 min

02Build tools & testing

Professional project setup.

  1. Maven & GradleMaven and Gradle download dependencies, compile code, run tests and package your app. They make builds repeatable on every machine and in CI.10 min
  2. Unit testing with JUnit 5JUnit 5 is the standard Java testing framework. You write small methods annotated with @Test that arrange data, call the code and assert the result.10 min
  3. Mocking with MockitoMockito creates fake versions of dependencies so you can test one class in isolation. You stub what the fake returns and verify how it was called.10 min

03Databases & SQL

Most backend bugs are data bugs.

  1. SQL: joins, grouping, subqueries, window functionsSQL is how you ask a relational database questions. Joins combine tables, GROUP BY summarises rows, and window functions rank or total rows without collapsing them.12 min
  2. Schema design, normalisation & indexesGood schema design stores each fact once and links tables with keys. Indexes then make the common queries fast, and EXPLAIN shows whether the database actually uses them.12 min
  3. JDBC & connection poolsJDBC is Java's low-level API for talking to databases, and JPA uses it underneath. A connection pool keeps open connections ready, because opening a new one per request is slow.11 min

04Spring Boot

The framework most Java backend jobs use.

  1. Spring core: IoC, beans & dependency injectionSpring's IoC container creates your objects, called beans, and injects their dependencies for you. Classes declare what they need, and Spring wires the graph at startup.11 min
  2. Spring Boot: starters, config & profilesSpring Boot adds starters, auto-configuration and an embedded server so an app runs with almost no setup. Profiles and external config let one build behave correctly in dev, test and prod.10 min
  3. REST APIs with Spring MVCSpring MVC maps HTTP requests to controller methods and converts Java objects to JSON. A clean API uses resource URLs, the right HTTP methods and status codes, and DTOs instead of entities.11 min
  4. Validation & global error handlingBean Validation annotations declare rules on DTO fields, and @Valid makes Spring enforce them before your code runs. A global @RestControllerAdvice turns every error into the same JSON shape.10 min
  5. Spring Data JPA & HibernateJPA maps Java classes to tables, and Hibernate is the implementation that generates the SQL. Spring Data JPA adds repository interfaces whose queries are derived from method names.12 min
  6. Transactions & database migrations (Flyway)@Transactional makes a method all-or-nothing: either every database change commits, or all are rolled back. Flyway versions your schema with numbered SQL files applied in order at startup.12 min
  7. Spring Security & JWT authSpring Security runs every request through a chain of filters that authenticate the caller and check permissions. With JWT, the client logs in once, then sends a signed token on each request.11 min
  8. Testing Spring apps & TestcontainersSpring offers test slices that start only part of the app, plus full @SpringBootTest integration tests. Testcontainers runs a real Postgres in Docker so repository tests match production.10 min
  9. API documentation with OpenAPIOpenAPI is a standard description of a REST API. springdoc-openapi generates it from your controllers, and Swagger UI turns it into interactive docs where you can try calls.9 min

05Production backend

What separates a demo from a real service.

  1. Caching with RedisRedis is an in-memory key-value store, often used as a cache in front of a database. Caching hot reads cuts latency and database load, but you must decide when cached data expires or is invalidated.11 min
  2. Messaging with KafkaKafka is a distributed log for events. Producers append events to topics, which are split into partitions, and consumer groups read them independently at their own pace using offsets.11 min
  3. Microservice patternsMicroservices split a system into small services that deploy independently and own their data. That buys team autonomy and scaling, at the cost of network failures and distributed data to manage.11 min
  4. Docker & deployment for JavaDocker packages your Spring Boot jar and a Java runtime into one image that runs the same everywhere. A multi-stage build compiles with a JDK but ships only a smaller JRE image.10 min
  5. Observability: Actuator & MicrometerSpring Boot Actuator adds endpoints for health, info and metrics. Micrometer records metrics in a vendor-neutral way, and Prometheus scrapes them so Grafana can graph and alert.9 min

06Capstone project

A backend you can deploy and talk through.

  1. Build a secure REST backend (e.g. booking or expense API)The capstone combines everything into one deployable backend, such as a booking or expense API. A finished repo with auth, tests, caching, Docker and CI is strong evidence in interviews.12 min