Created
April 8, 2023 17:46
-
-
Save XReyRobert/68bf86c2ca8cf864c5c793818aed4e59 to your computer and use it in GitHub Desktop.
Quarkus Hello World Application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.core.MediaType; | |
@Path("/hello") | |
public class ExampleResource { | |
@GET | |
@Produces(MediaType.TEXT_PLAIN) | |
public String hello() { | |
return "Hello World!"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<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.example</groupId> | |
<artifactId>quarkus-hello-world</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<properties> | |
<quarkus.version>2.5.0.Final</quarkus.version> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<maven.compiler.source>11</maven.compiler.source> | |
<maven.compiler.target>11</maven.compiler.target> | |
</properties> | |
<dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>io.quarkus</groupId> | |
<artifactId>quarkus-bom</artifactId> | |
<version>${quarkus.version}</version> | |
<type>pom</type> | |
<scope>import</scope> | |
</dependency> | |
</dependencies> | |
</dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>io.quarkus</groupId> | |
<artifactId>quarkus-resteasy</artifactId> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>io.quarkus</groupId> | |
<artifactId>quarkus-maven-plugin</artifactId> | |
<version>${quarkus.version}</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>build</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment