Merge pull request #7084 from urvyagrawal/BAEL-2968

Bael 2968
This commit is contained in:
Erik Pragt 2019-06-10 10:38:46 +10:00 committed by GitHub
commit fce304c87b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 141 additions and 0 deletions

View File

@ -646,6 +646,7 @@
<module>spring-boot-ops-2</module>
<module>spring-boot-rest</module>
<module>spring-boot-data</module>
<module>spring-boot-parent</module>
<module>spring-boot-property-exp</module>
<module>spring-boot-security</module>
<module>spring-boot-testing</module>
@ -1311,6 +1312,7 @@
<module>spring-boot-ops-2</module>
<module>spring-boot-rest</module>
<module>spring-boot-data</module>
<module>spring-boot-parent</module>
<module>spring-boot-property-exp</module>
<module>spring-boot-security</module>
<module>spring-boot-vue</module>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung</groupId>
<artifactId>spring-boot-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>spring-boot-parent</name>
<description>spring-boot-parent</description>
<packaging>pom</packaging>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-modules</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<modules>
<module>spring-boot-with-starter-parent</module>
<module>spring-boot-with-custom-parent</module>
</modules>
</project>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-boot-with-custom-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>spring-boot-with-custom-parent</name>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>spring-boot-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
<spring-boot.version>2.1.5.RELEASE</spring-boot.version>
</properties>
</project>

View File

@ -0,0 +1,13 @@
package com.baeldung.customparent;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringBootStarterCustomParentApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootStarterCustomParentApplication.class, args);
System.out.println("Spring boot application running without starter parent");
}
}

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung</groupId>
<artifactId>spring-boot-with-starter-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>spring-boot-with-starter-parent</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.5.RELEASE</version>
<!-- lookup parent from repository -->
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>2.1.1.RELEASE</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
<junit.version>4.11</junit.version>
</properties>
</project>

View File

@ -0,0 +1,14 @@
package com.baeldung.starterparent;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringBootStarterParentApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootStarterParentApplication.class, args);
System.out.println("Spring boot application running with starter parent");
}
}