1

Is Spring Boot just for Microservices or can I use Spring Boot for Monolithic architecture?

takendarkk
  • 3,347
  • 8
  • 25
  • 37
  • 1
    It can be used for monoliths, up to a certain point. If your application will have complex setup, you will find yourself overriding a lot of configuration that boot provides. Take an example of Mongo. In Spring boot, it works by default with just one database. If you want to create setup that connects to multiple databases, you will have to provide fully qualified configuration for DTO/Repositories scannning, autiding,any schema evolution tools(mongobee,etc). I'm not saying don't use it, just be prepared to override a lot of stuff if you are planing to do monolith – Ján Srniček Feb 18 '20 at 17:41

1 Answers1

10

Spring Boot in itself has nothing to do with microservices. It's a Spring module which simply makes the configuration of your app easier. As such, it absolutely can be used in a monolithic app.

From the 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

Community
  • 1
  • 1
Tolik Pylypchuk
  • 680
  • 1
  • 6
  • 15