0

I'm new to springboot and using spring.io to create project in order to create microservices.

When creating a project using spring.io website, a pom is created with all the relevant dependencies but versions are not added. Should I add the versions myself looking the maven repository jar (all jars include versions on them)?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user2304483
  • 1,462
  • 6
  • 28
  • 50

1 Answers1

5

All dependencies (and configurations) are managed by Spring Boot. The parent of the project you generated with Spring Initializr has the parent set to spring-boot-starter-parent:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.5.2</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

The parent of spring-boot-starter-parent is spring-boot-dependencies which defines all dependency versions.

Therefore you don't need to specify any versions of the starter dependencies or their dependencies manually.

Please take a look at The Spring Boot Starter Parent on Baeldung for a quick overview.

Gregor Zurowski
  • 2,222
  • 2
  • 9
  • 15