spring initializr: spring-boot-starter vs spring-boot-starter-web

后端 未结 3 2545
一生所求
一生所求 2021-02-20 19:01

I am trying to develop a sample spring boot based application in IntellIJ. So I used spring Initialzr approach, and made default selections during the setup. The pom.xml I ended

3条回答
  •  被撕碎了的回忆
    2021-02-20 19:33

    spring-boot-starter is itself a dependency of spring-boot-starter-web. If you include only spring-boot-starter dependency into your application then you will get only runtime infrastructure along with some core features. So for the web application you need to include spring-boot-starter-web so that you can get spring-mvc, jackson and spring-boot-starter. There is no need of using both. If you will use spring-boot-starter-web then it will be enough for your application. However using both will not will not through an error.

提交回复
热议问题