Getting started referred to a package name not present in quickstart (#28549)

* Getting started referred to a package name not present in quickstart

Techhub zip has com.example and g8 template defaults to com.example so let's refer to that instead

* Missing logger ops in one Scala example snippet
This commit is contained in:
Johan Andrén 2020-02-04 14:41:01 +01:00 committed by GitHub
parent 84e88bff02
commit 289ca787a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -32,7 +32,7 @@ In fact, before your first actor is started, Akka has already created two actors
The easiest way to see the actor hierarchy in action is to print `ActorRef` instances. In this small experiment, we create an actor, print its reference, create a child of this actor, and print the child's reference. We start with the Hello World project, if you have not downloaded it, download the Quickstart project from the @scala[[Lightbend Tech Hub](https://developer.lightbend.com/start/?group=akka&project=akka-quickstart-scala)]@java[[Lightbend Tech Hub](https://developer.lightbend.com/start/?group=akka&project=akka-quickstart-java)].
In your Hello World project, navigate to the `com.lightbend.akka.sample` package and create a new @scala[Scala file called `ActorHierarchyExperiments.scala`]@java[Java file called `ActorHierarchyExperiments.java`] here. Copy and paste the code from the snippet below to this new source file. Save your file and run `sbt "runMain com.lightbend.akka.sample.ActorHierarchyExperiments"` to observe the output.
In your Hello World project, navigate to the `com.example` package and create a new @scala[Scala file called `ActorHierarchyExperiments.scala`]@java[Java file called `ActorHierarchyExperiments.java`] here. Copy and paste the code from the snippet below to this new source file. Save your file and run `sbt "runMain com.example.ActorHierarchyExperiments"` to observe the output.
Scala
: @@snip [ActorHierarchyExperiments.scala](/akka-docs/src/test/scala/typed/tutorial_1/ActorHierarchyExperiments.scala) { #print-refs }

View file

@ -8,7 +8,7 @@ With an understanding of actor hierarchy and behavior, the remaining question is
We can define the first actor, the IotSupervisor, with a few lines of code. To start your tutorial application:
1. Create a new `IotSupervisor` source file in the `com.lightbend.akka.sample` package.
1. Create a new `IotSupervisor` source file in the `com.example` package.
1. Paste the following code into the new file to define the IotSupervisor.
Scala

View file

@ -138,7 +138,7 @@ Note in the code that:
## Testing the actor
Based on the actor above, we could write a test. In the `com.lightbend.akka.sample` package in the test tree of your project, add the following code to a @scala[`DeviceSpec.scala`]@java[`DeviceTest.java`] file.
Based on the actor above, we could write a test. In the `com.example` package in the test tree of your project, add the following code to a @scala[`DeviceSpec.scala`]@java[`DeviceTest.java`] file.
@scala[(We use ScalaTest but any other test framework can be used with the Akka Testkit)].
You can run this test @scala[by running `test` at the sbt prompt]@java[by running `mvn test`].

View file

@ -6,7 +6,6 @@ package typed.tutorial_3
import akka.actor.typed.PostStop
import akka.actor.typed.Signal
import akka.actor.typed.scaladsl.LoggerOps
object DeviceInProgress1 {
@ -30,6 +29,7 @@ object DeviceInProgress2 {
import akka.actor.typed.scaladsl.AbstractBehavior
import akka.actor.typed.scaladsl.ActorContext
import akka.actor.typed.scaladsl.Behaviors
import akka.actor.typed.scaladsl.LoggerOps
object Device {
def apply(groupId: String, deviceId: String): Behavior[Command] =