-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
# Conflicts: # Jaxrs/Basic/pom.xml # Jaxrs/BasicJLink/pom.xml # Jaxrs/OAuth/pom.xml
- Loading branch information
Showing
27 changed files
with
362 additions
and
113 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Maven Package | ||
on: | ||
workflow_dispatch: | ||
push: | ||
jobs: | ||
JaxRS-Basic: | ||
uses: GuicedEE/Workflows/.github/workflows/projects.yml@master | ||
with: | ||
baseDir: 'Jaxrs/Basic/' | ||
name: 'JAXRS Basic' | ||
secrets: | ||
USERNAME: ${{secrets.USERNAME}} | ||
USER_TOKEN: ${{secrets.USER_TOKEN}} | ||
SONA_USERNAME: ${{secrets.SONA_USERNAME}} | ||
SONA_PASSWORD: ${{secrets.SONA_PASSWORD}} | ||
JaxRS-BasicJLink: | ||
uses: GuicedEE/Workflows/.github/workflows/projects.yml@master | ||
needs: | ||
- JaxRS-Basic | ||
with: | ||
baseDir: 'Jaxrs/BasicJLink/' | ||
name: 'JAXRS Basic JLink' | ||
secrets: | ||
USERNAME: ${{secrets.USERNAME}} | ||
USER_TOKEN: ${{secrets.USER_TOKEN}} | ||
SONA_USERNAME: ${{secrets.SONA_USERNAME}} | ||
SONA_PASSWORD: ${{secrets.SONA_PASSWORD}} | ||
JaxRS-Bindings: | ||
uses: GuicedEE/Workflows/.github/workflows/projects.yml@master | ||
with: | ||
baseDir: 'Jaxrs/Binding/' | ||
name: 'JAXRS Bindings' | ||
secrets: | ||
USERNAME: ${{secrets.USERNAME}} | ||
USER_TOKEN: ${{secrets.USER_TOKEN}} | ||
SONA_USERNAME: ${{secrets.SONA_USERNAME}} | ||
SONA_PASSWORD: ${{secrets.SONA_PASSWORD}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,58 @@ | ||
<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> | ||
<parent> | ||
<groupId>com.guicedee.examples.jaxrs</groupId> | ||
<artifactId>examples-jaxrs-parent</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<packaging>jar</packaging> | ||
|
||
<groupId>com.guicedee.examples</groupId> | ||
<artifactId>jaxrs-basic-example</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
|
||
<properties> | ||
<maven.compiler.release>21</maven.compiler.release> | ||
<maven.compiler.source>21</maven.compiler.source> | ||
<maven.compiler.target>21</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.guicedee.servlets</groupId> | ||
<artifactId>guiced-rest-services</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.guicedee.servlets</groupId> | ||
<artifactId>guiced-undertow</artifactId> | ||
</dependency> | ||
|
||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-simple</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.guicedee</groupId> | ||
<artifactId>guicedee-bom</artifactId> | ||
<version>${project.version}</version> | ||
<scope>import</scope> | ||
<type>pom</type> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
|
||
</project> |
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
Jaxrs/Basic/src/main/java/com/guicedee/examples/jaxrs/basic/BootJaxRSBasic.java
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module com.guicedee.examples.jaxrs.basic { | ||
requires com.guicedee.guicedservlets.rest; | ||
requires com.guicedee.guicedservlets.undertow; | ||
|
||
requires java.net.http; | ||
|
||
exports com.guicedee.examples.jaxrs.basic; | ||
opens com.guicedee.examples.jaxrs.basic to com.google.guice, com.fasterxml.jackson.databind, org.apache.cxf; | ||
} |
37 changes: 37 additions & 0 deletions
37
Jaxrs/Basic/src/test/java/com/guicedee/examples/jaxrs/basic/tests/HelloWorldTest.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.guicedee.examples.jaxrs.basic.tests; | ||
|
||
import com.guicedee.examples.jaxrs.basic.HelloWorld; | ||
import com.guicedee.guicedinjection.GuiceContext; | ||
import com.guicedee.guicedservlets.undertow.GuicedUndertow; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.net.URI; | ||
import java.net.http.HttpClient; | ||
import java.net.http.HttpRequest; | ||
import java.net.http.HttpResponse; | ||
import java.time.Duration; | ||
import java.time.temporal.ChronoUnit; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
class HelloWorldTest | ||
{ | ||
@Test | ||
public void testWorld() throws Exception | ||
{ | ||
HelloWorld.main(null); | ||
|
||
HttpClient client = HttpClient.newBuilder() | ||
.connectTimeout(Duration.of(5, ChronoUnit.SECONDS)) | ||
.build(); | ||
HttpResponse response = client.send(HttpRequest.newBuilder() | ||
.GET() | ||
.uri(new URI("http://localhost:6003/rest/hello/world")) | ||
.build(), | ||
HttpResponse.BodyHandlers.ofString()); | ||
System.out.println(response.body()); | ||
assertEquals(200, response.statusCode()); | ||
|
||
GuiceContext.destroy(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module com.guicedee.examples.jaxrs.basic.test { | ||
requires com.guicedee.examples.jaxrs.basic; | ||
requires org.junit.jupiter.api; | ||
|
||
requires java.net.http; | ||
|
||
requires com.guicedee.guicedservlets.rest; | ||
requires com.guicedee.guicedservlets.undertow; | ||
|
||
opens com.guicedee.examples.jaxrs.basic.tests to com.google.guice, com.fasterxml.jackson.databind, org.apache.cxf,org.junit.platform.commons; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM alpine:3.14 | ||
LABEL authors="GedMarc" | ||
|
||
COPY target/maven-jlink/default /opt | ||
|
||
ENTRYPOINT ["/opt/bin/example"] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<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> | ||
|
||
<packaging>jar</packaging> | ||
|
||
<groupId>com.guicedee.examples</groupId> | ||
<artifactId>jaxrs-binding-example</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
|
||
<properties> | ||
<maven.compiler.release>21</maven.compiler.release> | ||
<maven.compiler.source>21</maven.compiler.source> | ||
<maven.compiler.target>21</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.guicedee.servlets</groupId> | ||
<artifactId>guiced-rest-services</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.guicedee.servlets</groupId> | ||
<artifactId>guiced-openapi</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-simple</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.guicedee</groupId> | ||
<artifactId>guicedee-bom</artifactId> | ||
<version>${project.version}</version> | ||
<scope>import</scope> | ||
<type>pom</type> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
|
||
</project> |
15 changes: 15 additions & 0 deletions
15
Jaxrs/Binding/src/main/java/com/guicedee/examples/jaxrs/binding/BootJaxRSBindings.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.guicedee.examples.jaxrs.binding; | ||
|
||
|
||
import com.guicedee.guicedinjection.GuiceContext; | ||
import com.guicedee.guicedservlets.undertow.GuicedUndertow; | ||
import io.undertow.Undertow; | ||
|
||
public class BootJaxRSBindings | ||
{ | ||
public static void main(String... args) throws Exception | ||
{ | ||
GuiceContext.registerModule("com.guicedee.examples.jaxrs.binding"); | ||
Undertow undertow = GuicedUndertow.boot("0.0.0.0", 6003); | ||
} | ||
} |
Oops, something went wrong.