Giriş
Eğer kendi parent pom dosyamız varsa parent olarak spring-boot-starter-parent'ı kullanamayız. Çünkü bir pom dosyasında sadece bir tane parent olabilir. Bu durumda hem kendi parent dosyamızı hem de springboot'u kullanmak için şöyle yaparız
Örnek
1. parent dosyamıza şu satırı ekleriz. Açıklaması şöyle
Eğer kendi parent pom dosyamız varsa parent olarak spring-boot-starter-parent'ı kullanamayız. Çünkü bir pom dosyasında sadece bir tane parent olabilir. Bu durumda hem kendi parent dosyamızı hem de springboot'u kullanmak için şöyle yaparız
Örnek
1. parent dosyamıza şu satırı ekleriz. Açıklaması şöyle
If we don't make use of the parent POM, we can still benefit from dependency management by adding the spring-boot-dependencies artifact with scope=importŞöyle yaparız.
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-dependencies</artifactId>
      <version>1.5.6.RELEASE</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>
On the other hand, without the parent POM, we no longer benefit from plugin management. This means we need to add the spring-boot-maven-plugin explicitly:Şöyle yaparız.
<build>
  <plugins>
    <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
    </plugin>
  </plugins>
</build>
Şöyle yaparız
<dependencyManagement><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>2.5.2</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><dependencies><dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId></dependency></dependencies>
