{"id":13843394,"url":"https://github.com/LiuKay/mmall-java","last_synced_at":"2025-07-11T19:31:35.476Z","repository":{"id":47024727,"uuid":"125781627","full_name":"LiuKay/mmall-java","owner":"LiuKay","description":"A simple project to learn different architecture (Monolithic on SpringBoot, Microservices on SpringCloud, K8S etc.). 一个简单的学习项目(Mall 商城)， 用来学习单体架构，微服务架构，K8S等","archived":false,"fork":false,"pushed_at":"2022-10-20T06:59:57.000Z","size":18219,"stargazers_count":68,"open_issues_count":1,"forks_count":30,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-12T14:02:49.986Z","etag":null,"topics":["java","k8s","mmall","spring-boot","spring-cloud"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LiuKay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-19T00:42:15.000Z","updated_at":"2024-09-29T01:19:01.000Z","dependencies_parsed_at":"2023-01-20T15:31:25.024Z","dependency_job_id":null,"html_url":"https://github.com/LiuKay/mmall-java","commit_stats":null,"previous_names":["liukay/mmall-kay-java"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiuKay%2Fmmall-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiuKay%2Fmmall-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiuKay%2Fmmall-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiuKay%2Fmmall-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LiuKay","download_url":"https://codeload.github.com/LiuKay/mmall-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225754974,"owners_count":17519181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","k8s","mmall","spring-boot","spring-cloud"],"created_at":"2024-08-04T17:02:06.657Z","updated_at":"2024-11-21T15:30:55.780Z","avatar_url":"https://github.com/LiuKay.png","language":"Java","readme":"# MMall \n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=LiuKay_mmall-java\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=LiuKay_mmall-java)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=LiuKay_mmall-java\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=LiuKay_mmall-java)\n\n\nA simple project to learn different architectures.\n\n## What - 这是什么\n\nMmall 是一个十分简化的商城项目，仅包含了用户、支付、库存管理等能支撑一个购物流程的业务功能，同时也包括了一些非业务功能，\n包括登录、身份认证、鉴权等。通过一些简化，从而来更好的学习不同的架构风格是什么样的。从单体服务风格，到微服务架构，再到\n云原生，不同的架构为了架构本身的问题而引入了一些新的组件。\n\n\u003e Based on [https://github.com/fenixsoft/monolithic_arch_springboot](https://github.com/fenixsoft/monolithic_arch_springboot) and made some improvements.\n\u003e\n\u003e 本项目基于周志明老师的[凤凰架构](https://icyfenix.cn/introduction/about-the-fenix-project.html)中的示例项目:[单体架构](https://github.com/fenixsoft/monolithic_arch_springboot). 在此基础上做一些改进和修改。\n\n\n## Current Version - 当前分支版本:\n\nMicroservices SpringCloud - 微服务 SpringCloud 版: [microservices_springcloud]([LiuKay/mmall-java at microservices_springcloud (github.com)](https://github.com/LiuKay/mmall-java/tree/microservices_springcloud)) \n\n| service                      | port | comment                                                  |\n| ---------------------------- | ---- | -------------------------------------------------------- |\n| mmall-domain-security        | 8301 | security service, OAuth2, JWT                            |\n| mmall-domain-account         | 8401 | account service                                          |\n| mmall-domain-warehouse       | 8501 | product, stockpile service                               |\n| mmall-domain-payment         | 8601 | payment, wallet service                                  |\n| mmall-domain-registry        | 8761 | services registry center                                 |\n| mmall-domain-gateway         | 8080 | API Gateway                                              |\n| mmall-platform-configuration | 8888 | configurations                                           |\n| mmall-lib-infrastructure     | NA   | infrastructure library, domain, dto, utils, lock service |\n|                              |      |                                                          |\n\n\n## Technology - 技术选型\n\n- SpringBoot\n- Spring Cache + Redis\n- Redisson as distributed lock\n- Spring Data JPA\n- Spring Security\n- Spring Security OAuth 2.3\n- Spring Security JWT\n- Jackson\n- Bean Validation 2.0 (Hibernate Validator 6)\n- Netflix Zuul\n- Netflix Eureka\n- Netflix Feign\n- Spring Config\n\n## Get Started\n\n### Local Run - 本地运行\n\n依赖的测试基础设施环境使用 Docker Compose 打包（见 docker-compose.yml），MySQL, Redis 等。\n\n本地演示会将所有service 打包到 Docker 运行，详情见 `docker-compose.dev.yml`\n\n```shell\n# 启动 docker 之后可以使用该命令启动演示\n./deploy_to_docker.sh\n\n# 或者\n./gradlew clean\n./gradlew assemble\ndocker-compose -f ./docker-compose.dev.yml up -d\n```\n\n### Debug - 调式模式\n\n调式模式只在 Docker 环境中启动需要的基础设施，如 Redis， MySQL 等，业务服务可以在 IDEA 中分别启动，或使用 Gradle 命令分别启动，按照先启动 registery，configuration 再启动其他。\n\n```shell\n# 1.setup infrastructure\ndocker-compose -f ./docker-compose.debug.yml up -d\n\n# 2.setup services\n./gradlew :mmall-platform-registry:bootRun\n./gradlew :mmall-platform-configuration:bootRun\n./gradlew :mmall-platform-gateway:bootRun\n./gradlew :mmall-domain-security:bootRun\n./gradlew :mmall-domain-account:bootRun\n./gradlew :mmall-domain-payment:bootRun\n./gradlew :mmall-domain-warehouse:bootRun\n```\n\n\n\n进入主页 [http://localhost:8080/](http://localhost:8080/)  默认账号 kaybee, 密码 123456\n\n![home](img/home.png)\n\n-----\n\n### Develop Plan - 开发计划\n\n- 单体版本使用 SpringBoot (已完成)，分支： [feature/monolithic_springboot](https://github.com/LiuKay/mmall-java/tree/feature/monolithic_springboot)\n- 微服务版本使用 Spring Cloud 体系 （已完成），分支：[feature/microservices_springcloud](https://github.com/LiuKay/mmall-java/tree/feature/microservices_springcloud) \n- K8s 版本 （开发中）\n\n## Frontend Project - 前端项目\n\n[https://github.com/LiuKay/mmall-frontend](https://github.com/LiuKay/mmall-frontend)\n\n## Other Versions - 其他版本（分支）\n\n- v1.0\n\n  单服务器 + FTP文件服务器,\n\n  主要技术：SSM/Guava/Jackson/Joda/注解\n\n- v2.0\n\n  Tomcat集群+Nginx负载均衡+Redis分布式,\n\n  在V1.0基础上进行迭代重构，主要技术Redis 、Spring Schedule、Tomcat集群、Nginx负载均衡\n\n- v3.0_springboot_Deprecated （已废弃）\n\n  重构了登录鉴权的部分\n\n","funding_links":[],"categories":["Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLiuKay%2Fmmall-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLiuKay%2Fmmall-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLiuKay%2Fmmall-java/lists"}