Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions samples/java-eventsourced-shopping-cart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This example project implements an API for a shopping cart using an Akka Serverl
read [designing services](https://developer.lightbend.com/docs/akka-serverless/designing/index.html)
* developing - it may be useful to read up
on [developing services](https://developer.lightbend.com/docs/akka-serverless/developing/index.html) and in particular
the [Java section](https://developer.lightbend.com/docs/akka-serverless/java-services/index.html)
the [Java section](https://developer.lightbend.com/docs/akka-serverless/java/index.html)

## Building

Expand Down Expand Up @@ -44,7 +44,7 @@ mvn compile exec:java

With both the proxy and your application running, any defined endpoints should be available at `http://localhost:9000`.
In addition to the defined gRPC interface, each method has a corresponding HTTP endpoint. Unless configured otherwise (
see [Transcoding HTTP](https://docs.lbcs.dev/js-services/proto.html#_transcoding_http)), this endpoint accepts POST
see [Transcoding HTTP](https://developer.lightbend.com/docs/akka-serverless/java/proto.html#_transcoding_http)), this endpoint accepts POST
requests at the path `/[package].[entity name]/[method]`. For example, using `curl`:

* Send an AddItem command:
Expand Down Expand Up @@ -75,8 +75,8 @@ grpcurl --plaintext -d '{"cart_id": "cart1", "product_id": "akka-tshirt" }' loca

## Running integration tests

The integration tests in `src/it` are added by setting it as test source directory. To Integration Tests in src/it/java
with
The integration tests in `src/it` are added by setting `it` as test source directory.
To run the Integration Tests in `src/it/java` use

```shell
mvn verify -Pit
Expand All @@ -93,6 +93,6 @@ You will need to update the `akkasls.dockerImage` property in the `pom.xml` and
for more information on how to make your docker image available to Akka Serverless.

Finally, you can or use the [Akka Serverless Console](https://console.akkaserverless.com)
to create a project and then deploy your service into the project either by using `mvn deploy`, through the `akkasls`
CLI or via the web interface. When using `mvn deploy`, Maven will also conveniently package and publish your docker
image prior to deployment.
to create a project and then deploy your service into the project either by using `mvn deploy`,
through the `akkasls` CLI or via the web interface. When using `mvn deploy`, Maven will also
conveniently package and publish your docker image prior to deployment.
25 changes: 15 additions & 10 deletions samples/java-valueentity-shopping-cart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ This example project implements an API for a shopping cart using an Akka Serverl

## See also

* designing - while designing your service it is useful to read [designing services](https://developer.lightbend.com/docs/akka-serverless/designing/index.html)
* developing - it may be useful to read up on [developing services](https://developer.lightbend.com/docs/akka-serverless/developing/index.html) and in particular the [Java section](https://developer.lightbend.com/docs/akka-serverless/java-services/index.html)
* designing - while designing your service it is useful to
read [designing services](https://developer.lightbend.com/docs/akka-serverless/designing/index.html)
* developing - it may be useful to read up
on [developing services](https://developer.lightbend.com/docs/akka-serverless/developing/index.html) and in particular
the [Java section](https://developer.lightbend.com/docs/akka-serverless/java/index.html)

## Building

Expand All @@ -15,13 +18,12 @@ To build, at a minimum you need to generate and process sources, particularly wh
mvn compile
```


## Running Locally

In order to run your application locally, you must run the Akka Serverless proxy. The included `docker-compose` file contains the configuration required to run the proxy for a locally running application.
It also contains the configuration to start a local Google Pub/Sub emulator that the Akka Serverless proxy will connect to.
To start the proxy, run the following command from this directory:

In order to run your application locally, you must run the Akka Serverless proxy. The included `docker-compose` file
contains the configuration required to run the proxy for a locally running application. It also contains the
configuration to start a local Google Pub/Sub emulator that the Akka Serverless proxy will connect to. To start the
proxy, run the following command from this directory:

```shell
docker-compose up
Expand All @@ -40,7 +42,10 @@ To start the application locally, the `exec-maven-plugin` is used. Use the follo
mvn compile exec:java
```

With both the proxy and your application running, any defined endpoints should be available at `http://localhost:9000`. In addition to the defined gRPC interface, each method has a corresponding HTTP endpoint. Unless configured otherwise (see [Transcoding HTTP](https://docs.lbcs.dev/js-services/proto.html#_transcoding_http)), this endpoint accepts POST requests at the path `/[package].[entity name]/[method]`. For example, using `curl`:
With both the proxy and your application running, any defined endpoints should be available at `http://localhost:9000`.
In addition to the defined gRPC interface, each method has a corresponding HTTP endpoint. Unless configured otherwise (
see [Transcoding HTTP](https://developer.lightbend.com/docs/akka-serverless/java/proto.html#_transcoding_http)), this endpoint accepts POST
requests at the path `/[package].[entity name]/[method]`. For example, using `curl`:

* Send an AddItem command:

Expand Down Expand Up @@ -70,8 +75,8 @@ grpcurl --plaintext -d '{"cart_id": "cart1", "product_id": "akka-tshirt" }' loca

## Running integration tests

The integration tests in `src/it` are added by setting it as test source directory.
To Integration Tests in src/it/java with
The integration tests in `src/it` are added by setting `it` as test source directory.
To run the Integration Tests in `src/it/java` use

```shell
mvn verify -Pit
Expand Down
2 changes: 1 addition & 1 deletion samples/valueentity-counter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mvn archetype:generate \
-DarchetypeVersion=LATEST
```

See the [Kickstart a Maven project](https://developer.lightbend.com/docs/akka-serverless/java-services/kickstart.html) in the documentation for details.
See the [Kickstart a Maven project](https://developer.lightbend.com/docs/akka-serverless/java/kickstart.html) in the documentation for details.

## Building and running unit tests

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ object DocLinks {
private val baseUrl = "https://developer.lightbend.com/docs/akka-serverless"

private val errorCodes = Map(
"AS-00112" -> s"$baseUrl/java-services/views.html#changing",
"AS-00402" -> s"$baseUrl/java-services/topic-eventing.html",
"AS-00406" -> s"$baseUrl/java-services/topic-eventing.html"
"AS-00112" -> s"$baseUrl/java/views.html#changing",
"AS-00402" -> s"$baseUrl/java/topic-eventing.html",
"AS-00406" -> s"$baseUrl/java/topic-eventing.html"
)

// fallback if not defined in errorCodes
private val errorCodeCategories = Map(
"AS-001" -> s"$baseUrl/java-services/views.html",
"AS-002" -> s"$baseUrl/java-services/value-entity.html",
"AS-003" -> s"$baseUrl/java-services/eventsourced.html",
"AS-004" -> s"$baseUrl/java-services/" // no single page for eventing
"AS-001" -> s"$baseUrl/java/views.html",
"AS-002" -> s"$baseUrl/java/value-entity.html",
"AS-003" -> s"$baseUrl/java/eventsourced.html",
"AS-004" -> s"$baseUrl/java/" // no single page for eventing
)

def forErrorCode(code: String): Option[String] =
Expand Down