• indog
      link
      fedilink
      arrow-up
      7
      ·
      8 months ago

      Spring singleton beans are supposed to be stateless though, so they can’t be called variables. Maybe the DI aspect of Spring is less relevant today in the micro service era, but in the day Spring helped make layered monolith apps much cleaner.

      • aluminium@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        8 months ago

        Really? From my experience the opposite is the case. I work on a smallish team with 3 other developers and we also have a few spring services with < 100 classes and we constantly run into issues where making changes to a bean causes issues in another unrelated part of the codebase. I can’t imagine what a nightmare it would be with a larger codebase and more devs working on it.