参考 DDD/Clean Architecture 设计理念,整合 Spring Boot/Spring Security/Mybatis Plus/Vavr 的 Spring Realworld 应用案例

Overview

Contributors Forks Stargazers Issues MIT License


Logo

Demo · 更多项目 · 参考资料

ms-spring-ddd-examples

Unified Domain-driven Layered Architecture for MicroService Apps,试图探索一套切实可行的应用架构规范,可以复制、可以理解、可以落地、可以控制复杂性的指导和约束。

For more information on how to this works with other frontends/backends, head over to the RealWorld repo.

WIP,项目正在逐步开放中,对于软件架构与领域驱动设计请参考Software Architecture Series 软件架构设计系列文章,关于 Spring 相关学习参考 Spring Series

UDLA

洋葱圈图

Usage

IDE

安装 google-java-format 和 lombok 插件;在配置中 Editor | Code Style | scheme 中导入 conf/intellij-java-google-style.xml 风格配置。

Database Migration

使用 flyway 进行数据库迁移,迁移脚本默认放在 infra/src/main/resources/db/migration 下,在 infra/build.gradle 已经默认配置了测试数据库。

./gradlew flywayInfo
./gradlew :realworld:infra:flywayInfo

可以通过 flyway.configFiles 来替换配置文件:

./gradlew -Pflyway.configFiles=/path/to/flyway.conf flywayInfo

flyway 依赖在 com.udma.core.infra 子项目中添加,如果配置文件使用相对路径,它相对的将是该子项目根目录。如在根目录中执行命令,要使用 conf/flyway-local.conf 配置:

./gradlew -Pflyway.configFiles=../conf/flyway-local.conf flywayInfo

数据库迁移脚本的命名见 https://flywaydb.org/documentation/migrations#naming。我们正常使用的就是 Versioned Migrations。

Deployment

此部署指部署 Web 应用。

  • 本地部署
cp conf/env.tpl .dev.env
# 设定 .dev.env 中的环境变量

# 构建、推送镜像
(source .dev.env && ./scripts/docker/build-locally.sh)
# 部署
(source .dev.env && ./scripts/deploy-locally.sh)
  • 正式版本部署
git checkout master
git merge dev

# 修改 .prod.env 版本如 1.0
(source .prod.env && ./scripts/docker/build-locally.sh && ./scripts/deploy-locally.sh)

# 部署成功后,推送对应 tag
git tag 1.0 -m
git push --tags

About

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

  • Awesome-Lists: 📚 Guide to Galaxy, curated, worthy and up-to-date links/reading list for ITCS-Coding/Algorithm/SoftwareArchitecture/AI. 💫 ITCS-编程/算法/软件架构/人工智能等领域的文章/书籍/资料/项目链接精选。

  • Awesome-CS-Books: 📚 Awesome CS Books/Series(.pdf by git lfs) Warehouse for Geeks, ProgrammingLanguage, SoftwareEngineering, Web, AI, ServerSideApplication, Infrastructure, FE etc. 💫 优秀计算机科学与技术领域相关的书籍归档。

  • Hutool #Project#: A set of com.udma.core.tools that keep Java sweet.

  • freedom: freedom 是一个基于六边形架构的框架,可以支撑充血的领域模型范式。

Copyright & More | 延伸阅读

笔者所有文章遵循知识共享 署名 - 非商业性使用 - 禁止演绎 4.0 国际许可协议,欢迎转载,尊重版权。您还可以前往 NGTE Books 主页浏览包含知识体系、编程语言、软件工程、模式与架构、Web 与大前端、服务端开发实践与工程架构、分布式基础架构、人工智能与深度学习、产品运营与创业等多类目的书籍列表:

NGTE Books

You might also like...

Guns基于SpringBoot 2,致力于做更简洁的后台管理系统,完美整合springmvc + shiro + mybatis-plus + beetl!Guns项目代码简洁,注释丰富,上手容易,同时Guns包含许多基础模块(用户管理,角色管理,部门管理,字典管理等10个模块),可以直接作为一个后台管理系统的脚手架!

Guns基于SpringBoot 2,致力于做更简洁的后台管理系统,完美整合springmvc + shiro + mybatis-plus + beetl!Guns项目代码简洁,注释丰富,上手容易,同时Guns包含许多基础模块(用户管理,角色管理,部门管理,字典管理等10个模块),可以直接作为一个后台管理系统的脚手架!

Guns基于Spring Boot2,致力于做更简洁的后台管理系统。包含系统管理,代码生成,多数据库适配,SSO单点登录,工作流,短信,邮件发送,OAuth2登录,任务调度,持续集成,docker部署等功。支持Spring Cloud Alibaba微服务。社区活跃,版本迭代快,加群免费技术支持。

Jan 5, 2023

基于RuoYi-Vue集成 Lombok+Mybatis-Plus+Undertow+knife4j+Hutool+Feign 重写所有原生业务 定期与RuoYi-Vue同步

基于RuoYi-Vue集成 Lombok+Mybatis-Plus+Undertow+knife4j+Hutool+Feign 重写所有原生业务 定期与RuoYi-Vue同步

平台简介 RuoYi-Vue-Plus 是基于 RuoYi-Vue 针对 分布式集群 场景升级 定期与 RuoYi-Vue 同步 集成 Lock4j dynamic-datasource 等分布式场景解决方案 集成 Mybatis-Plus Lombok Hutool 等便捷开发工具 适配重写相关业

Jan 4, 2023

SpringBoot SpringSecurity Jpa mybatis-plus websocket Redis camunda Vue3 Vite ant-design VbenAdmin vxe-table bpmn.js

SpringBoot SpringSecurity Jpa mybatis-plus websocket Redis camunda Vue3 Vite ant-design VbenAdmin vxe-table bpmn.js

Dec 13, 2022

该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的线上博客项目/企业大型商城系统/前后端分离实践项目等,摆脱各种 hello world 入门案例的束缚,真正的掌握 Spring Boot 开发。

该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的线上博客项目/企业大型商城系统/前后端分离实践项目等,摆脱各种 hello world 入门案例的束缚,真正的掌握 Spring Boot 开发。

Spring Boot Projects 该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的前

Dec 30, 2022

Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login example with Spring Security, MySQL and JWT Appropriate Flow for User Login and Registration with JWT Spring Boot Rest Api Architect

Jan 5, 2023

一个小而美的低代码全栈开发平台,一键生成后端api接口+前端页面代码+在线接口文档,节省50%的前后端开发的工作量。基于springboot +mybatis+spring security+vue 技术栈

YOMA [toc] 一个小而美的低代码全栈开发平台,一键生成后端api接口+前端页面代码+在线接口文档,节省50%的前后端开发的工作量,平台代码100%开源。平台适用于企业信息化、政务、中小型互联网等项目 平台采用前后端分离架构,基于如下流行的开源框架,易上手+便于后期维护 后端:https://

Dec 9, 2022

🦄 开源社区系统:基于 SpringBoot + MyBatis + MySQL + Redis + Kafka + Elasticsearch + Spring Security + ... 并提供详细的开发文档和配套教程。包含帖子、评论、私信、系统通知、点赞、关注、搜索、用户设置、数据统计等模块。

🦄 开源社区系统:基于 SpringBoot + MyBatis + MySQL + Redis + Kafka + Elasticsearch + Spring Security + ... 并提供详细的开发文档和配套教程。包含帖子、评论、私信、系统通知、点赞、关注、搜索、用户设置、数据统计等模块。

Echo — 开源社区系统 项目上线到服务器之后可能会出现各种各样的 BUG,比如 Elasticsearch 服务启动失败导致搜索模块不可用,但是在本地运行是完全没问题的,所以各位小伙伴可以放心下载部署。 📚 项目简介 Echo 是一套前后端不分离的开源社区系统,基于目前主流 Java Web

Jan 7, 2023

Application developed during the DDD training with 6 students.

Easyorder Application developed during the DDD training with 6 students. MongoDB To start MongoDB, use docker: docker run -p 27017:27017 --name mongo

Jan 21, 2022
Owner
王下邀月熊
Just Coder, Travel in the Galaxy 💫博客/公众号:某熊的技术之路 💫技术笔记 💫代码实践 & 开源项目
王下邀月熊
An example to show how you could use clean architecture and DDD elements with Camunda.

Camunda DDD and Clean Architecture An example to show how you could use clean architecture and DDD and their advantages with Camunda. I also wrote a b

Luc Weinbrecht 10 Dec 15, 2022
以教学为目的的电商系统。包含ToB复杂业务、互联网高并发业务、缓存应用;DDD、微服务指导。模型驱动、数据驱动。了解大型服务进化路线,编码技巧、学习Linux,性能调优。Docker/k8s助力、监控、日志收集、中间件学习。前端技术、后端实践等。主要技术:SpringBoot+JPA+Mybatis-plus+Antd+Vue3。

简介 bcMall 是一个以教学为目的的电商系统。bcMall将为你展现一个典型的系统演进过程,所使用的主流技术完全开放。 它包含ToB复杂业务、互联网高并发业务、缓存应用;DDD、微服务指导。模型驱动、数据驱动。了解大型服务进化路线,编码技巧、学习Linux,性能调优。Docker/k8s助力、监

xjjdog 411 Jan 3, 2023
【多模块微服务脚手架平台——Ancba】前后端分离架构SpringBoot 2.x、SpringCloud、SpringAdmin、Spring Security、Mybatis-plus、(Shiro)、JWT、Feign、Nacos、Knif4j等。

Ancba 打造Blog.Core项目的SpringBoot微服务版,但是更强大 ?? Ancba (Another New CLI By Alacrity) 另一个全新的敏捷脚手架(单体/模块化/微服务都可支持)。 核心知识点与进度 ?? 在 ..../resources/application-

ansonzhang 35 Nov 29, 2022
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023
Spring Boot Clean Architecture - Iran Plate

Spring Boot Clean Architecture Sample Iran Plate Location Finder I used the Clean Architecture in my project. In this method we can develop our projec

Mahdi Amirabdolahi 4 Jul 6, 2022
A web application to generate Java source code with spring-boot and mybatis-plus

A web application to generate Java source code with spring-boot and mybatis-plus. Also, The class of Domain,Mapper,XML of Mapper Interface,Service,Controller are included. You can change the data source what you want to generate for your project in app running without restart this code -generator application.

Weasley 3 Aug 29, 2022
A React Native project starter with Typescript, a theme provider with hook to easy styling component, a folder architecture ready and some configs to keep a codebase clean.

React Native Boilerplate Folder structure : src ├── assets │   ├── audios │   ├── fonts │   ├── icons │   └── images ├── components │   ├── Layout.tsx

LazyRabbit 23 Sep 1, 2022
This project illustrates TDD & Clean Architecture implementation in Java

Banking Kata - Java Overview This project illustrates TDD & Clean Architecture implementation in Java, showing the Use Case Driven Development Approac

Valentina Cupać 191 Dec 28, 2022
Spring-Boot-Plus is a easy-to-use, high-speed, high-efficient,feature-rich, open source spring boot scaffolding

Everyone can develop projects independently, quickly and efficiently! What is spring-boot-plus? A easy-to-use, high-speed, high-efficient, feature-ric

geekidea 2.3k Dec 31, 2022