BAEL-6527 GraalVM Native Image Docker Image (#14835)
* BAEL-6527 GraalVM Native Image Docker Image * BAEL-6527 GraalVM Native Image Docker Image
This commit is contained in:
parent
40c5ed0c6f
commit
b52e2cc3d1
@ -104,6 +104,7 @@
|
|||||||
<module>spring-boot-springdoc-2</module>
|
<module>spring-boot-springdoc-2</module>
|
||||||
<module>spring-boot-documentation</module>
|
<module>spring-boot-documentation</module>
|
||||||
<module>spring-boot-3-url-matching</module>
|
<module>spring-boot-3-url-matching</module>
|
||||||
|
<module>spring-boot-graalvm-docker</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
FROM ubuntu:jammy
|
||||||
|
COPY target/springboot-graalvm-docker /springboot-graalvm-docker
|
||||||
|
CMD ["/springboot-graalvm-docker"]
|
41
spring-boot-modules/spring-boot-graalvm-docker/pom.xml
Normal file
41
spring-boot-modules/spring-boot-graalvm-docker/pom.xml
Normal 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>com.baeldung</groupId>
|
||||||
|
<artifactId>parent-boot-3</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../parent-boot-3</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>com.baeldung</groupId>
|
||||||
|
<artifactId>spring-boot-graalvm-docker</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<name>spring-boot-graalvm-docker</name>
|
||||||
|
<description>Spring Boot GrralVM with Docker</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.graalvm.buildtools</groupId>
|
||||||
|
<artifactId>native-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.baeldung.graalvmdockerimage;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
public class GraalvmDockerImageApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(GraalvmDockerImageApplication.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
class HelloController {
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
public String hello() {
|
||||||
|
return "Hello GraalVM";
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
|
Loading…
x
Reference in New Issue
Block a user