Hammerhall RU

Articles

A course on writing a service in Java and Spring Boot 4. Every article starts with a task, not a tool, and explains each new word where it first appears. The examples are for learning: you can reproduce them yourself.

Read in order, from zero: each article builds on the ones before it. Numbering runs through all the cycles.

Published 7 of 21 · next — 6

"From Java to Spring Boot" 0–5

The first cycle: from the Java of a course to your first application on Spring Boot 4, with a database, endpoints, and tests.

  1. 0What to know before Spring

    Records, enums with a code, unchecked exceptions, Maven, and table-driven tests on JUnit 6: what to know before your first Spring application.

    20–25 min read

  2. 1Why Spring

    Wire an application by hand, then let the Spring container do it: constructor injection, beans, @Component, @Configuration, @Bean.

    30 min read

  3. 2Spring Boot 4 for absolute beginners

    How Spring Boot 4 starts: auto-configuration, embedded Tomcat, the new starters, settings from YAML, profiles and the environment, checks at startup.

    25 min read

  4. 3aData, part 1: a table and a migration

    A SQL table that guards its own rules, Flyway migrations, and a migration test against a real Postgres in Docker.

    30 min read

  5. 3bData, part 2: entity, repository, transaction

    How a Java object becomes a table row, an all-or-nothing transaction, and a test against a real database.

    30 min read

  6. 4Your first endpoint: how an application answers over HTTP

    HTTP and curl, a controller and JSON, errors as responses, and a web layer test with a Mockito mock, no database needed.

    35 min read

  7. 5The full endpoint: layers, access, paging, tests on every layer

    Layers and records instead of entities, paged lists, sign-in and roles with Spring Security, and tests for every layer.

    45 min read

"From Spring to a System" 6–11

The second cycle, for those who finished the first: a staging environment on Docker, events and JSON done properly, value objects, harder data, metrics, and tests that guard the project's rules.

In preparation.

"From a System to the Business" 12–18

The third cycle: code with a real business behind it. A next step with a date, statuses only the system can set, money in code, rules in settings, a payment nobody reported, Lombok and MapStruct, and migrations that remember decisions.

In preparation.