Coder Social home page Coder Social logo

owenqsx / hexagon-boot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from threeq/hexagon-boot

0.0 0.0 0.0 466 KB

一个基于 spring-boot 的六边形架构风格 Demo

JavaScript 1.31% Java 64.74% Groovy 0.38% TypeScript 23.18% CSS 2.23% HTML 6.95% API Blueprint 0.75% FreeMarker 0.38% Dockerfile 0.08%

hexagon-boot's Introduction

hexagon-boot 六边形架构风格 demo 项目

                    /----------\
                  /              \
                /                  \
              /                      \
            /         /-----\          \
           |         /       \          |  
    User --+-Adapter/ 应用服务 \  Adapter+-- DB
           |        |    ^    |         |
           |        |    |    |         |
           |        \ 领域模型 / Adapter-+-- Document
            \        \       /         /
              \       \-----/        /
                \                  /
                  \              /
                    \----------/

  • libs 项目自身所需要的依赖的公共库,比如工具类
  • core 包含领域模型 和 应用服务器,实现业务逻辑。core 自己不提供独立运行能力
  • adapterendpoint 属于适配 端口,这里区别是在于 endpoint 可以独立运行,adapter 不能独立运行。包含 Facade、Translator、Adapter

运行 demo

  1. 启动依赖服务器 mysql
docker-compose up -d
  1. 启动 adapter-rest 适配 端口
./gradlew bootRun -p hexagon-boot-endpoint-rest
  1. 测试服务
# post 提交数据
curl -XPOST -H "Content-type: application/json" http://127.0.0.1:8080/v1/report/error \
-d'{ "appType":"1111111111", "pageUrl":"222222" }'


# 通过 get 请求查看数据提交是否成功
curl -XGET http://127.0.0.1:8080/v1/report/error 

hexagon-boot's People

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.