Commit 812e624 1 parent 398e47f commit 812e624 Copy full SHA for 812e624
File tree 6 files changed +31
-25
lines changed
6 files changed +31
-25
lines changed Original file line number Diff line number Diff line change 1
1
version = "3.8.3"
2
- runner.dialect = scala213
2
+ runner.dialect = scala3
Original file line number Diff line number Diff line change 1
- # akka -http-example
1
+ # pekko -http-example
2
2
3
3
[ ![ Test] ( https://github.com/yokra9/akka-http-example/actions/workflows/Test.yml/badge.svg )] ( https://github.com/yokra9/akka-http-example/actions/workflows/Test.yml )
4
4
@@ -17,12 +17,16 @@ sbt run
17
17
# テストを実施
18
18
sbt test
19
19
20
- # カバレッジを測定してレポートを出力 (target/scala-2.13/scoverage-report/)
20
+ # カバレッジを測定してレポートを出力
21
21
sbt clean coverage test coverageReport
22
22
23
23
# Docker イメージのビルド
24
- sbt docker: publishLocal
24
+ sbt Docker/ publishLocal
25
25
26
26
# Dockerfile 生成のみ (target/docker/stage)
27
- sbt docker:stage
27
+ sbt Docker/stage
28
+
29
+ # 手動ビルドとコンテナの開始
30
+ docker build -t pekko-example target/docker/stage/
31
+ docker run -p 8088:8088 --env JAVA_OPTS=-Dhttp.port=8088 pekko-example
28
32
```
Original file line number Diff line number Diff line change 1
- ThisBuild / scalaVersion := " 2.13.14 "
1
+ ThisBuild / scalaVersion := " 3.3.3 "
2
2
run / fork := true
3
3
4
4
libraryDependencies ++= Seq (
5
- " com.typesafe.akka " %% " akka -actor-typed" % " 2.6.20 " ,
6
- " com.typesafe.akka " %% " akka -stream" % " 2.6.20 " ,
7
- " com.typesafe.akka " %% " akka -http" % " 10.2.10 " ,
5
+ " org.apache.pekko " %% " pekko -actor-typed" % " 1.1.0 " ,
6
+ " org.apache.pekko " %% " pekko -stream" % " 1.1.0 " ,
7
+ " org.apache.pekko " %% " pekko -http" % " 1.0.1 " ,
8
8
" ch.qos.logback" % " logback-classic" % " 1.5.7" ,
9
9
" org.scalactic" %% " scalactic" % " 3.2.19" ,
10
10
" org.scalatest" %% " scalatest" % " 3.2.19" % Test
Original file line number Diff line number Diff line change 1
- import akka .actor .typed .ActorSystem
2
- import akka .actor .typed .scaladsl .Behaviors
3
- import akka .event .Logging
4
- import akka .http .scaladsl .Http
5
- import akka .http .scaladsl .model ._
6
- import akka .http .scaladsl .server .Directives ._
1
+ import org . apache . pekko .actor .typed .ActorSystem
2
+ import org . apache . pekko .actor .typed .scaladsl .Behaviors
3
+ import org . apache . pekko .event .Logging
4
+ import org . apache . pekko .http .scaladsl .Http
5
+ import org . apache . pekko .http .scaladsl .model ._
6
+ import org . apache . pekko .http .scaladsl .server .Directives ._
7
7
import scala .concurrent .{Await , Future }
8
8
import scala .concurrent .duration .Duration
9
9
10
10
object Main {
11
- implicit val system = ActorSystem (Behaviors .empty, " my-sample-app" )
11
+ implicit val system : ActorSystem [Any ] =
12
+ ActorSystem (Behaviors .empty, " my-sample-app" )
12
13
13
14
def main (args : Array [String ]): Unit = {
14
15
Await .ready(start(), Duration .Inf )
Original file line number Diff line number Diff line change 1
- akka .http.client {
2
- user-agent-header = "akka -http"
1
+ pekko .http.client {
2
+ user-agent-header = "pekko -http"
3
3
}
Original file line number Diff line number Diff line change 1
- import akka .actor .typed .ActorSystem
2
- import akka .actor .typed .scaladsl .Behaviors
3
- import akka .http .scaladsl .Http
4
- import akka .http .scaladsl .model ._
5
- import akka .http .scaladsl .unmarshalling .Unmarshal
1
+ import org .apache .pekko .actor .typed .ActorSystem
2
+ import org .apache .pekko .actor .typed .scaladsl .Behaviors
3
+ import org .apache .pekko .event .Logging
4
+ import org .apache .pekko .http .scaladsl .Http
5
+ import org .apache .pekko .http .scaladsl .model ._
6
+ import org .apache .pekko .http .scaladsl .unmarshalling .Unmarshal
6
7
import scala .concurrent .{Await , Future }
7
8
import scala .concurrent .duration ._
8
9
import scala .language .postfixOps
@@ -45,7 +46,7 @@ class MainTests extends AsyncFunSuite {
45
46
.map(str => {
46
47
println(str)
47
48
assert(
48
- str.equals(" param: Map(q -> 1), user-agent: akka -http}" )
49
+ str.equals(" param: Map(q -> 1), user-agent: pekko -http}" )
49
50
)
50
51
})
51
52
}
@@ -64,7 +65,7 @@ class MainTests extends AsyncFunSuite {
64
65
.map(str => {
65
66
println(str)
66
67
assert(
67
- str.equals(" param: Map(), user-agent: akka -http}" )
68
+ str.equals(" param: Map(), user-agent: pekko -http}" )
68
69
)
69
70
})
70
71
}
You can’t perform that action at this time.
0 commit comments