This example can be used to distributed processing in JAVA when you need asyncronous multi thread worker pattern., having:
port | Description |
---|---|
8989 | Vert.x communication port, it is used when communicate to Facade normal verticle which works request and response to client |
9000 | Springboot embeded port, it is used when mybatis jdbc connection pool |
7979 | Springboot actuator port, it is used service instance monitoring |
mvn clean spring-boot:run -P h2local
or, you can build to profile mariadb after change application.properties in mariadb profile
mvn clean spring-boot:run -P mariadb
id : bookexample, pw : 1234
http://localhost:7979/actuator
http://localhost:7979/actuator/liquibase
In console log, you can see different worker thread works in concrete class instance works as [worker-thread-0] ~ [worker-thread-8]
curl --request GET --url http://localhost:8989/book/list
curl -X POST http://localhost:8989/book/add
-d '{
"name":"marble comics",
"author":"marble",
"pages":987
}'
curl -X GET http://localhost:8989/book/id/1
curl -X DELETE http://localhost:8989/book/delete/2