The case · 02

Why Spring Boot

The backend is where correctness, throughput and operability actually matter. Spring Boot wins there not because any single feature is unbeatable, but because it is the only option where everything — security, data, messaging, batch, observability, testing — is production-grade and designed to fit together.

⏱ 12 min readOpinion, with evidence

1 · The JVM is still the best general-purpose server runtime

JVMNode.jsPythonGo
CPU-bound throughputExcellent (JIT)Poor — single-threadedPoorExcellent
True multithreadingYesWorker threads, awkwardGILYes
Memory footprintHigherLowerLowerLowest
Startup1–3 s (0.05 s native)FastFastFast
Profiling & diagnosticsJFR, heap dumps, async-profilerBasicBasicpprof
Library depth for business softwareUnmatchedBroad but shallowStrong in data/MLThin

Java 21's virtual threads removed the last serious objection: you can now handle very high I/O concurrency with ordinary blocking code, which is far easier to read and debug than reactive pipelines.

application.yml — one line, thousands of concurrent requests
spring:
  threads:
    virtual:
      enabled: true

2 · Observability nobody else matches

two dependencies, and you have this
/actuator/health/liveness     is the process wedged?
/actuator/health/readiness    can it serve traffic?
/actuator/prometheus          request latency histograms, JVM, pool, GC
/actuator/conditions          why is this bean missing?
/actuator/threaddump          what is every thread doing right now?
/actuator/heapdump            what is consuming the heap?
/actuator/loggers             change log levels without a restart

Distributed tracing is one more dependency and trace ids appear automatically in every log line. Achieving the equivalent in most other ecosystems means assembling four libraries and maintaining the glue. Detail in Spring Boot chapter 12.

3 · Convention that you can always inspect

Auto-configuration is often described as magic. It is not — it is conditional @Bean methods, and the framework will show you every decision it made:

terminal
java -jar app.jar --debug   # prints the CONDITIONS EVALUATION REPORT

Every default backs off the moment you define your own bean. You get a working application in one file and full control the moment you need it — without a "eject" step that dumps 2,000 lines of configuration on you.

4 · Security you are not writing yourself

Authentication is not a good place to be original

Spring Security handles JWT validation, key rotation, OAuth2/OIDC flows, CSRF, session fixation, password hashing and method-level authorisation — reviewed by a large community and patched quickly. Hand-rolled auth is where small teams create their worst vulnerabilities.

a complete JWT resource server
spring:
  security:
    oauth2:
      resourceserver:
        jwt:
          issuer-uri: https://auth.example.com/realms/orders
          audiences: orders-api

5 · Backwards compatibility measured in decades

Code written against Spring 3 largely still compiles against Spring 6. Deprecations run for years before removal, and major migrations ship with tooling (OpenRewrite recipes, spring-boot-migrator). For software that must be maintained for ten years, that track record is a feature you can price.

6 · Testing is a first-class concern

NeedProvided
Test one layer fast@WebMvcTest, @DataJpaTest, @JsonTest
Real database in tests@ServiceConnection + Testcontainers, zero config
Replace a bean@MockitoBean
Assert HTTP behaviourMockMvc without a socket
Security tests@WithMockUser, jwt() post-processor

What it costs, honestly

CostMitigation
~250 MB idle memoryFine on a container; expensive at 200 replicas. Native images cut it to ~60 MB.
1–3 second startupIrrelevant for long-running services; CDS or native for serverless.
Surface area is largeYou can be productive with about 20 annotations; the rest waits until needed.
Proxy-based magic has sharp edgesSelf-invocation, non-public methods — one page of rules (chapter 13).
Two languages if the front end is TypeScriptReal. The trade is a better runtime and a better ops story.

Which Spring Boot property is most often the difference between a healthy service and an exhausted connection pool?

The default keeps a database connection bound to the request thread until the response is written, which hides N+1 queries and drains the pool under load. It is the first setting to change in any new project.