3 Star 9 Fork 4

kenxue/ddd-framework

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

ddd-framework

GitHub Watchers GitHub Stars GitHub Forks

中文简体 | English

介绍

ddd-framework 是一款基于领域驱动设计的开发脚手架,拥有极高的拓展性,能够应对大型复杂系统的架构。采用 端分离开发, 提供代码生成器

架构

分层架构

img

目录结构

ddd-framework
    ├─core              核心模块
    │  ├─acl                防腐层
    │  ├─adapter            控制层
    │  ├─application        应用层
    │  ├─core-client        核心二方包
    │  ├─domain             领域层
    │  ├─share-dataobject   全局共享数据对象
    │  └─infrastructure     基础设施层
    ├─extensions        外部拓展
    │  └─acl-impl           acl实现
    ├─client                二方包
    ├─core                  启动类
    ├─dependencies          依赖管理
    └─doc                   文档数据

快速开始

1.直接clone项目使用

git clone https://github.com/ken-xue/ddd-framework.git
cd ddd-framework
mvn clean install

2.通过 maven archetype 创建

# 1.克隆下载
git clone https://github.com/ken-xue/ddd-framework.git
cd ddd-framework
mvn clean install
# 2.创建原型
mvn archetype:create-from-project
cd target/generated-sources/archetype
mvn clean install
# 3.通过原型创建项目
mvn archetype:generate -DarchetypeCatalog=local
  • 如果遇到mapstruct问题请在Idea里如下设置

Setting->Build,Execution,Deployment->Compiler->User-local build

-Djps.track.ap.dependencies=false

代码生成器

1.创建数据库表

2.导入插件 请先自行下载本地部署或者私服部署

<plugin>
    <groupId>io.ddd.framework</groupId>
    <artifactId>ddd-framework-maven-plugin</artifactId>
    <version>1.0.2-SNAPSHOT</version>
    <configuration>
        <dataSource>
            <driverName>com.mysql.cj.jdbc.Driver</driverName>
            <url>jdbc:mysql://127.0.0.1:3306/ddd_framework</url>
            <username>root</username>
            <password>123456</password>
        </dataSource>
        <config>
            <sourcePath>./</sourcePath>
            <tablePrefixes>sys_,biz_</tablePrefixes>
            <moduleName>sys</moduleName>
            <packageName>io.ddd.framework</packageName>
            <tableNames>sys_user,sys_menu</tableNames>
            <excludeFields>id,uuid,creator,modifier,gmt_create,gmt_modified,deleted</excludeFields>
            <author>麦奇</author>
            <email>biaogejiushibiao@outlook.com</email>
        </config>
    </configuration>
</plugin>

3.执行生成命令

mvn ddd-framework:generate

4.清除最近一次生成的代码文件

mvn ddd-framework:delete

5.生成的文件会在你配置的路径下

文档

许可证

MIT see LICENSE.

welcome!

MIT License Copyright (c) 2021 麦奇 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

领域驱动设计落地实现基础脚手架 展开 收起
Java 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/ken_xue/ddd-framework.git
git@gitee.com:ken_xue/ddd-framework.git
ken_xue
ddd-framework
ddd-framework
main

搜索帮助

Cb406eda 1850385 E526c682 1850385