Skip to content

Commit

Permalink
relocating to submodule to add client examples
Browse files Browse the repository at this point in the history
  • Loading branch information
andrus committed Apr 28, 2024
1 parent a32dbed commit d5656ea
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 45 deletions.
48 changes: 3 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,13 @@

# Bootique 3.x Jersey Examples

This is an example [Bootique](http://bootique.io) REST service app with Jersey. It shows how to create and register REST
endpoints, write integration tests for the REST API, assemble and run the application.

Different Git branches contain the example code for different versions of Bootique:
Provides examples of [Bootique](https://bootique.io) integration with Jersey. Different Git branches contain the example code for different versions of Bootique:

* [3.x](https://github.com/bootique-examples/bootique-jersey-examples/tree/3.x)
* [2.x](https://github.com/bootique-examples/bootique-jersey-examples/tree/2.x)
* [1.x](https://github.com/bootique-examples/bootique-jersey-examples/tree/1.x)

## Prerequisites

To build and run the code, ensure you have the following installed on your machine:

* Java 11 or newer
* Maven

and then follow these steps:

## Checkout
```
git clone git@github.com:bootique-examples/bootique-jersey-examples.git
cd bootique-jersey-examples/
```

## Build, test and package

Run the following command to build the code, run the tests and package the app:
```
mvn clean package
```
This project uses a [runnable jar with lib folder](https://bootique.io/docs/3.x/bootique-docs/#runnable-jar-with-lib)
packaging recipe, so now the app is packaged for distribution as `target/bootique-jersey-examples-3.0.tar.gz` archive. But
there is also the "unpacked" version in the `target` folder that can be used to run the app.

## Run

The following command prints a help message with supported options:
```
java -jar target/bootique-jersey-examples-3.0.jar
```
## Contents

The following command runs the REST app with the default config. Once the app is started, you can see the results by
going to this URL in the browser: http://127.0.0.1:8080/
```
java -jar target/bootique-jersey-examples-3.0.jar --server
```
* [Jersey Server examples](bootique-jersey-server/)

The following command runs the REST app with a custom config that changes the app port and context, Once the app is
started, you can see the results by going to this URL in the browser: http://127.0.0.1:9000/bq
```
java -jar target/bootique-jersey-examples-3.0.jar --server --config=config.yml
```
48 changes: 48 additions & 0 deletions bootique-jersey-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Bootique 3.x Jersey Server Example

This is an example [Bootique](http://bootique.io) REST service app with Jersey. It shows how to create and register REST
endpoints, write integration tests for the REST API, assemble and run the application.

## Prerequisites

To build and run the code, ensure you have the following installed on your machine:

* Java 11 or newer
* Maven

and then follow these steps:

## Checkout
```
git clone git@github.com:bootique-examples/bootique-jersey-examples.git
cd bootique-jersey-examples/bootique-jersey-server/
```

## Build, test and package

Run the following command to build the code, run the tests and package the app:
```
mvn clean package
```
This project uses a [runnable jar with lib folder](https://bootique.io/docs/3.x/bootique-docs/#runnable-jar-with-lib)
packaging recipe, so now the app is packaged for distribution as `target/bootique-jersey-server-3.0.tar.gz` archive. But
there is also the "unpacked" version in the `target` folder that can be used to run the app.

## Run

The following command prints a help message with supported options:
```
java -jar target/bootique-jersey-server-3.0.jar
```

The following command runs the REST app with the default config. Once the app is started, you can see the results by
going to this URL in the browser: http://127.0.0.1:8080/
```
java -jar target/bootique-jersey-server-3.0.jar --server
```

The following command runs the REST app with a custom config that changes the app port and context, Once the app is
started, you can see the results by going to this URL in the browser: http://127.0.0.1:9000/bq
```
java -jar target/bootique-jersey-server-3.0.jar --server --config=config.yml
```
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d5656ea

Please sign in to comment.