From 2cf52853fa36746f00791e8c728fc623a4297130 Mon Sep 17 00:00:00 2001 From: Anshul Bansal Date: Mon, 28 Jun 2021 18:42:50 +0300 Subject: [PATCH] BAEL-4913 - Spring Native (#10942) * BAEL-4913 - Spring Native * BAEL-4913 - review commit --- pom.xml | 3 +- spring-native/pom-nativeimage.xml | 122 ++++++++++++++++++ spring-native/pom.xml | 80 ++++++++++++ .../springnativeintro/SpringNativeApp.java | 9 ++ 4 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 spring-native/pom-nativeimage.xml create mode 100644 spring-native/pom.xml create mode 100644 spring-native/src/main/java/com/baeldung/springnativeintro/SpringNativeApp.java diff --git a/pom.xml b/pom.xml index eac534697a..477ae66454 100644 --- a/pom.xml +++ b/pom.xml @@ -660,6 +660,7 @@ spring-mobile spring-mockito + spring-native spring-protobuf spring-quartz @@ -1117,7 +1118,7 @@ spring-mobile spring-mockito - + spring-native spring-protobuf spring-quartz diff --git a/spring-native/pom-nativeimage.xml b/spring-native/pom-nativeimage.xml new file mode 100644 index 0000000000..1b2cc3944a --- /dev/null +++ b/spring-native/pom-nativeimage.xml @@ -0,0 +1,122 @@ + + + 4.0.0 + baeldung-spring-native + baeldung-spring-native + jar + Intro to Spring Native + + + com.baeldung + parent-boot-2 + 0.0.1-SNAPSHOT + ../parent-boot-2 + + + + + spring-release + Spring release + https://repo.spring.io/release + + + + + + spring-release + Spring release + https://repo.spring.io/release + + + + + + org.springframework.boot + spring-boot-starter-parent + ${spring-boot.version} + pom + + + org.springframework.experimental + spring-native + ${spring-native.version} + + + org.springframework.experimental + spring-aot + ${spring-native.version} + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + org.springframework.experimental + spring-aot-maven-plugin + ${spring-native.version} + + + test-generate + + test-generate + + + + generate + + generate + + + + + + + + + + native + + + + org.graalvm.buildtools + native-maven-plugin + ${native-maven-plugin.version} + + + build-native + + build + + package + + + + + org.springframework.boot + spring-boot-maven-plugin + + exec + + + + + + + + + 2.5.1 + 0.10.0 + 0.9.0 + 1.8 + 1.8 + 1.8 + + + \ No newline at end of file diff --git a/spring-native/pom.xml b/spring-native/pom.xml new file mode 100644 index 0000000000..1064800352 --- /dev/null +++ b/spring-native/pom.xml @@ -0,0 +1,80 @@ + + + 4.0.0 + baeldung-spring-native + baeldung-spring-native + jar + Intro to Spring Native + + + com.baeldung + parent-boot-2 + 0.0.1-SNAPSHOT + ../parent-boot-2 + + + + + spring-release + Spring release + https://repo.spring.io/release + + + + + + spring-release + Spring release + https://repo.spring.io/release + + + + + + org.springframework.boot + spring-boot-starter-parent + ${spring-boot.version} + pom + + + org.springframework.experimental + spring-native + ${spring-native.version} + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + ${builder} + + true + + IF_NOT_PRESENT + + + + + org.springframework.experimental + spring-aot-maven-plugin + ${spring-native.version} + + + + + + paketobuildpacks/builder:tiny + 2.5.1 + 0.10.0 + 1.8 + 1.8 + 1.8 + + + \ No newline at end of file diff --git a/spring-native/src/main/java/com/baeldung/springnativeintro/SpringNativeApp.java b/spring-native/src/main/java/com/baeldung/springnativeintro/SpringNativeApp.java new file mode 100644 index 0000000000..fa54d34f9f --- /dev/null +++ b/spring-native/src/main/java/com/baeldung/springnativeintro/SpringNativeApp.java @@ -0,0 +1,9 @@ +package com.baeldung.springnativeintro; + +public class SpringNativeApp { + + public static void main(String[] args) { + System.out.println("Hello, World! This is a Baledung Spring Native Application"); + } + +}