使用 spring-boot 库而不是核心库有什么好处?

what are the benefits of using a spring-boot library instead of the core libs?

我需要在我的 spring-boot 应用程序中使用 Kafka,我看到 spring-boot 有自己的 spring-kafka 库。我是 spring 和 java 的新手,很困惑我是否应该使用 spring-kafka 或任何其他应用程序的基于 spring 的库而不是使用核心库以及什么是其中之一的好处。

Spring 使用 Kafka 启动时带有各种自动配置 out-of-the-box 让您免于配置每个和所有内容的麻烦(尽管您绝对可以覆盖 spring-boot 自以为是的自动配置)。

  • 因此,如果您希望 ready-made 应用程序快速运行,您可以借助 spring-boot 及其实用程序。

  • 如果您的偏好是配置所有内容以获得精细控制,请使用核心库。

我会说这只是选择或偏好的问题。