Spring Boot 是否仅适用于微服务?我可以使用 Spring Boot for Monolithic architecture 吗?

Is Spring Boot just for Microservices ? can i use Spring Boot for Monolithic architecture?

Spring Boot 仅适用于微服务还是我可以使用 Spring Boot for Monolithic 架构?

Spring 引导本身与微服务无关。它是一个 Spring 模块,可让您的应用程序配置更轻松。因此,它绝对可以在单体应用中使用。

来自official docs

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run".

We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.

Features

  • Create stand-alone Spring applications

  • Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)

  • Provide opinionated 'starter' dependencies to simplify your build configuration

  • Automatically configure Spring and 3rd party libraries whenever possible

  • Provide production-ready features such as metrics, health checks and externalized configuration

  • Absolutely no code generation and no requirement for XML configuration