This repository has been archived by the owner on May 31, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b676977
commit 51d46d8
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/main/java/io/hardingadonis/saledock/api/v1/DemoAPI.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,16 @@ | ||
package io.hardingadonis.saledock.api.v1; | ||
|
||
import io.hardingadonis.saledock.model.*; | ||
import io.hardingadonis.saledock.utils.*; | ||
import jakarta.ws.rs.*; | ||
import jakarta.ws.rs.core.*; | ||
|
||
@Path("v1/demo") | ||
public class DemoAPI { | ||
|
||
@GET | ||
@Produces(MediaType.APPLICATION_JSON) | ||
public Product getProduct() { | ||
return Singleton.productDAO.getByID(1).get(); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/io/hardingadonis/saledock/config/SaleDockApplication.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,12 @@ | ||
package io.hardingadonis.saledock.config; | ||
|
||
import jakarta.ws.rs.*; | ||
import org.glassfish.jersey.server.*; | ||
|
||
@ApplicationPath("api") | ||
public class SaleDockApplication extends ResourceConfig { | ||
|
||
public SaleDockApplication() { | ||
packages("io.hardingadonis.saledock.api"); | ||
} | ||
} |