What carries over
Node.js / Express concept Spring Boot equivalent Why it matters
Routing – app.get('/users', …) Controller methods – @GetMapping("/users") Both map HTTP verbs + paths to handler code. The mental model of “request → handler” stays the same.
Middleware – app.use(bodyParser.json()) Filters / Interceptors – OncePerRequestFilter or HandlerInterceptor The idea of a processing pipeline that can inspect/modify request and response persists.
Dependency injection via modules – require('./service') Spring DI – @Service , @Autowired You’re still letting the framework wire objects, just with annotations and a container instead of manual require .
Environment configuration – process.env.PORT Externalized config – @Value("${server.port}") or application.yml Both encourage keeping secrets and env‑specific values out of code.
Asynchronous handling – async/await or callbacks Reactive / CompletableFuture – @Async , WebFlux or plain CompletableFuture Non‑blocking request handling is still a goal; the…