Git Product home page Git Product logo

vertx-embedded-springboot's Introduction

Vert.x embeded Springboot

This example can be used to distributed processing in JAVA when you need asyncronous multi thread worker pattern., having:

  • Vert.x Worker threads verticle example
  • SpringBoot Liquebase, init DB data migration when container deploying.
  • SpringBoot Actuator, process status check
  • Vert.x SpringBoot JPA example, SQL.
  • Vert.x SpringBoot with Mybatis, SQL.
This example works in the following order.
  1. liquibase DB migration to DataBase(H2 or MariaDB) when instance have deployed
  2. Migration Status Check at Spring Actuator
  3. Rest API Check to Vert.x Facade verticle (Request & Response)
  4. Check worker thread logging in console logging. (initial set : worker verticle instance 4, Event Loop : 6 )
  5. Check Mybatis sql logging
port info
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
To try the example,
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
Let's check initail migration

id : bookexample, pw : 1234

http://localhost:7979/actuator
http://localhost:7979/actuator/liquibase
To try request rest api

In console log, you can see different worker thread works in concrete class instance works as [worker-thread-0] ~ [worker-thread-8]

  • book list search
curl --request GET --url http://localhost:8989/book/list
  • book add
curl -X POST http://localhost:8989/book/add   
-d '{
  "name":"marble comics",
  "author":"marble",
  "pages":987
}'
  • book search one
curl -X GET http://localhost:8989/book/id/1
  • book delete
curl -X DELETE http://localhost:8989/book/delete/2

Reference

  1. https://vertx.io/docs/vertx-core/java/
  2. https://github.com/vert-x3/

vertx-embedded-springboot's People

Contributors

dependabot[bot] avatar hyeonsangjeon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.