Akka hands-on preparation procedure from Java

This is the preparation procedure for Hands-on to touch Akka from Java.

Flow of preparation

  1. Installation of required software (JDK / Maven / IntelliJ IDEA / HTTPie)

1. 1. Installation of required software

2. Get source code

git clone [email protected]:yugolf/akka-in-action-java.git

3. 3. Run the test

Run the test


mvn test

Execution result


[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< com:goticks-java >--------------------------
[INFO] Building goticks-java 1.0
[INFO] --------------------------------[ jar ]---------------------------------

(abridgement)

Results :

Tests run: 14, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.740 s
[INFO] Finished at: 2018-12-08T23:19:20+09:00
[INFO] ------------------------------------------------------------------------

4. Start the server

Start the server


mvn compile exec:exec

5. API operation check

(1) Creating an event

HTTP request


http POST localhost:5000/events/JJUG/ tickets:=5

HTTP response


HTTP/1.1 201 Created
Content-Length: 27
Content-Type: application/json
Date: Sat, 08 Dec 2018 14:36:29 GMT
Server: GoTicks.com REST API

{
    "name": "JJUG",
    "tickets": 5
}
(2) Acquisition of event list

HTTP request (event list)


http GET localhost:5000/events/

Execution result


HTTP/1.1 200 OK
Content-Length: 40
Content-Type: application/json
Date: Sat, 08 Dec 2018 14:37:24 GMT
Server: GoTicks.com REST API

{
    "events": [
        {
            "name": "JJUG",
            "tickets": 5
        }
    ]
}

6. Import source code into IntelliJ IDEA

That's all for preparation. Thank you for your support.

Postscript

Hands-on was done on the "hands on" branch.

Switch branches


git checkout handson

Recommended Posts

Akka hands-on preparation procedure from Java
Spring 5 & Spring Boot 2 Hands-on preparation procedure
Call Java from JRuby
Changes from Java 8 to Java 11
Sum from Java_1 to 100
Java (eclipse) installation procedure
[Summary] Java environment preparation
Eval Java source from Java
Access API.AI from Java
From Java to Ruby !!
[MySQL + Java] Numbering procedure
CData Software hands-on (getting kintone data from Java console application)
CData Software Hands-on (Get Twitter data from Java console application)
Migration from Cobol to JAVA
Java starting from beginner, override
Creating ElasticSearch index from Java
JAVA qualification exam preparation materials
Java Silver exam preparation memo
Connect from Java to PostgreSQL
Java, instance starting from beginner
Java starting from beginner, inheritance
Java life starting from scratch
Using Docker from Java Gradle
From Ineffective Java to Effective Java
JavaScript as seen from Java
Execute non-Java instructions from Java