Skip to content

Commit

Permalink
BAEL-7940 - Added podman desktop spring boot demo (eugenp#16894)
Browse files Browse the repository at this point in the history
* BAEL-7940 - Added podman desktop spring boot demo

* BAEL-7940 - Added podman desktop spring boot demo
  • Loading branch information
abh1navv authored Jun 30, 2024
1 parent 945309d commit 193e87f
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
5 changes: 5 additions & 0 deletions podman/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM openjdk:17-alpine
WORKDIR /app
COPY target/spring-boot-podman-desktop-1.0-SNAPSHOT.jar app.jar
EXPOSE 8080
CMD ["java", "-jar", "app.jar"]
25 changes: 25 additions & 0 deletions podman/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?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>podman</artifactId>
<version>1.0-SNAPSHOT</version>

<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-boot-3</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-3/pom.xml</relativePath>
</parent>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>

</project>
12 changes: 12 additions & 0 deletions podman/src/main/java/com/baeldung/demo/HelloWorldApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.baeldung.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class HelloWorldApplication {

public static void main(String[] args) {
SpringApplication.run(HelloWorldApplication.class, args);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.baeldung.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWorldController {

@GetMapping("/hello")
public String helloWorld() {
return "Hello, World!";
}
}
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@
<!--<module>persistence-modules/java-harperdb</module>--> <!-- This module requires a library to download manually -->
<module>persistence-modules/spring-data-neo4j</module>
<module>protobuffer</module>
<module>podman</module>
<module>quarkus-modules</module>
<module>reactive-systems</module>
<module>reactor-core</module>
Expand Down

0 comments on commit 193e87f

Please sign in to comment.