{"id":13630953,"url":"https://github.com/crossoverJie/SSM","last_synced_at":"2025-04-17T17:32:14.444Z","repository":{"id":41493416,"uuid":"61623700","full_name":"crossoverJie/SSM","owner":"crossoverJie","description":":two_hearts: build SSM from 0 👉🏽👉🏽  distributed micro service.","archived":true,"fork":false,"pushed_at":"2018-07-02T14:32:39.000Z","size":4404,"stargazers_count":3443,"open_issues_count":5,"forks_count":1340,"subscribers_count":269,"default_branch":"master","last_synced_at":"2024-11-08T22:36:56.263Z","etag":null,"topics":["dubbo","dubbo-http","lucene","redis","shiro","ssm","websockets"],"latest_commit_sha":null,"homepage":"https://crossoverjie.top/categories/SSM/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crossoverJie.png","metadata":{"files":{"readme":"README-ZH.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":"2016-06-21T10:09:02.000Z","updated_at":"2024-11-06T00:50:59.000Z","dependencies_parsed_at":"2022-08-27T20:12:11.426Z","dependency_job_id":null,"html_url":"https://github.com/crossoverJie/SSM","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossoverJie%2FSSM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossoverJie%2FSSM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossoverJie%2FSSM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossoverJie%2FSSM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crossoverJie","download_url":"https://codeload.github.com/crossoverJie/SSM/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249360044,"owners_count":21257160,"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":["dubbo","dubbo-http","lucene","redis","shiro","ssm","websockets"],"created_at":"2024-08-01T22:02:04.385Z","updated_at":"2025-04-17T17:32:09.433Z","avatar_url":"https://github.com/crossoverJie.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n                                                                                                                    \n \u003cimg src=\"https://ws4.sinaimg.cn/large/006tNc79ly1fluug8kpmnj30gl07hweq.jpg\" \u003e\n \u003cbr/\u003e\n \u003cbr/\u003e\n \u003ca href=\"https://travis-ci.org/crossoverJie/SSM\"\u003e\n    \u003cimg src=\"https://travis-ci.org/crossoverJie/SSM.svg?branch=master\" \u003e\n \u003c/a\u003e\n \u003ca href=\"https://jq.qq.com/?_wv=1027\u0026k=5HPYvQk\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/QQ%E7%BE%A4-787381170-yellowgreen.svg\" \u003e\n \u003c/a\u003e\n \u003ca href=\"https://badge.juejin.im/entry/5856c00061ff4b0063be6be0/likes.svg?style=flat-square\"\u003e\n    \u003cimg src=\"https://badge.juejin.im/entry/5856c00061ff4b0063be6be0/likes.svg?style=flat-square\" \u003e\n \u003c/a\u003e\n \u003ca href=\"https://github.com/ellerbrock/open-source-badge/\"\u003e\n    \u003cimg src=\"https://badges.frapsoft.com/os/v1/open-source.svg?v=103\" \u003e\n \u003c/a\u003e\n\u003cp\u003e\n\n使用Idea搭建的Maven项目，会不定期更新一些在实际开发中使用的技巧,没有复杂的业务流程，更不是**XXXX系统**，只有一些技术的分享\n\n## 目录结构\n\n```shell\n├── SSM-API                                    // 通用API  \n│   ├── src/main\n│   ├── ├──java/com/crossoverJie               // 具体代码。  \n│   ├── ├──resources\n├── SSM-BOOT                                   // 提供给内部使用的dubbo依赖\n│   ├── ├──resources/spring                    // dubbo consumer相关配置\n├── SSM-SECONDS-KILL                           // 秒杀模块\n│   ├── ├──SSM-SECONDS-KILL-API                // 对外 dubbo 相关的 api\n│   ├── ├──SSM-SECONDS-KILL-ORDER-CONSUMER     // 订单的 kafka 消费\n│   ├── ├──SSM-SECONDS-KILL-SERVICE            // dubbo 服务模块\n│   ├── ├──SSM-SECONDS-KILL-WEB                // Web 模块\n├── SSM-SERVICE                                // dubbo应用的service实现\n│   ├── src/main\n│   ├── ├──java/com/crossoverJie/api           // 具体代码\n│   ├── ├──├──controller                       // 心跳检测接口\n│   ├── ├──├──dubbo                            // dubbo相关代码\n│   ├── ├──├──├──dao                           // dao层\n│   ├── ├──├──├──pojo                          // pojo包\n│   ├── ├──├──├──service                       // service层\n│   ├── ├──├──├──util                          // 工具类\n│   ├── ├──├──impl                             // dubbo API实现\n│   ├── ├──resources                           // 配置文件\n│   ├── ├──├──mapping                          // *.mapper配置文件\n│   ├── ├──├──spring                           // spring相关配置文件\n├── SSM-WEB                                    // web应用\n│   ├── src/main\n│   ├── ├──java/com/crossoverJie               // 具体代码\n│   ├── ├──├──controller                       // 控制器层\n│   ├── ├──├──cxf                              // CXF相关代码\n│   ├── ├──├──dao                              // dao层\n│   ├── ├──├──enums                            // 枚举包\n│   ├── ├──├──intercept                        // 拦截器\n│   ├── ├──├──kafka                            // Kafka\n│   ├── ├──├──├──official                      // 官方消费\n│   ├── ├──├──├──optimization                  // 多线程消费\n│   ├── ├──├──lucene                           // Lucene 相关包\n│   ├── ├──├──pojo                             // pojo包\n│   ├── ├──├──req                              // 请求类\n│   ├── ├──├──res                              // 响应类\n│   ├── ├──├──service                          // service层\n│   ├── ├──├──shiro                            // shiro相关代码\n│   ├── ├──├──util                             // 工具类\n│   ├── ├──├──vo                               // vo包\n│   ├── ├──resources\n│   ├── ├──├──mapping                          // *.mapper配置文件\n│   ├── ├──webapp                              // 前端文件\n├── doc\n│   ├──lucene                                  // lucene文件\n│   ├──sql                                     // sql脚本\n├── .gitignore                                 // git忽略项\n├── pom.xml                                    // 父pom\n├── LICENSE               \n├── README.md               \n\n```\n\n\n## TODO LIST\n\n* [x] [SSM(一)架构的整合](http://crossoverjie.top/2016/06/28/SSM1)\n* [x] [SSM(二)Lucene全文检索](http://crossoverjie.top/2016/07/06/SSM2)\n* [x] [SSM(三)Shiro使用详解](http://crossoverjie.top/2016/07/15/SSM3/)\n* [x] [SSM(四)WebService入门详解](http://crossoverjie.top/2016/08/02/SSM4/)\n* [x] [SSM(五)基于webSocket的聊天室](http://crossoverjie.top/2016/09/04/SSM5/)\n* [x] [SSM(六)跨域传输](http://crossoverjie.top/2016/10/18/SSM6/)\n* [x] [SSM(七)在JavaWeb应用中使用Redis](http://crossoverjie.top/2016/12/18/SSM7/)\n* [x] [SSM(八)动态切换数据源](http://crossoverjie.top/2017/01/05/SSM8/)\n* [x] [SSM(九) 反射的实际应用 - 构建日志对象](http://crossoverjie.top/2017/01/19/SSM9/)\n* [x] [SSM(十) 项目重构-互联网项目的Maven结构](http://crossoverjie.top/2017/03/04/SSM10/)\n* [x] [SSM(十一) 基于dubbo的分布式架构](http://crossoverjie.top/2017/04/07/SSM11/)\n* [x] [SSM(十二) SSM(十二) dubbo日志插件](http://crossoverjie.top/2017/04/25/SSM12/)\n* [x] [SSM(十三) 将dubbo暴露出HTTP服务](http://crossoverjie.top/2017/05/02/SSM13/)\n* [x] [SSM(十四) 基于annotation的http防重插件](https://crossoverjie.top/2017/05/24/SSM14/)\n* [x] [乐观锁与悲观锁的实际应用](https://crossoverjie.top/2017/07/09/SSM15/)\n* [x] [SSM(十六)曲线救国-`Kafka consumer`消费异常处理](https://crossoverjie.top/2017/09/05/SSM16/)\n* [x] [SSM(十七) MQ应用](https://crossoverjie.top/2017/10/20/SSM17/)\n* [x] [SSM(十八) 秒杀架构实践](https://crossoverjie.top/2018/05/07/ssm/SSM18-seconds-kill/)\n\n--- \n\n# 常见问题\n\n#### 以 `crossoverJie` 开头的依赖或代码不存在？\n\n这是由于我在项目中有依赖自己的 jar 包，并没有发布到 maven 中央厂库。\n\n*解决方案:*\n\n- 如果不需要这两个插件再 `pom` 依赖中去掉相关依赖即可。\n- 如果需要则按照 \n\nhttps://github.com/crossoverJie/SSM-REQUEST-CHECK \n\nhttps://github.com/crossoverJie/SSM-DUBBO-HTTP \n\nhttps://github.com/crossoverJie/SSM-DUBBO-FILTER\n\n`install` 到本地即可。\n- 不要 clone `master`分支，使用https://github.com/crossoverJie/SSM/releases/tag/2.1.0 或之前的 tag 即可。\n\n\n---\n\n# 应用截图\n\n![](https://i.imgur.com/6of3Z5K.gif)\n\n![封面.jpg](https://ooo.0o0.ooo/2017/05/24/59253bc0291c1.jpg)\n\n![dubbo-http封面.jpg](https://user-gold-cdn.xitu.io/2017/5/3/fa1a532f5289bb58f887a8561ec236ed.jpg)\n\n![2.jpg](https://ooo.0o0.ooo/2017/04/07/58e66e4917dd1.jpg)\n\n![](http://i.imgur.com/nRcHFQg.png)\n\n\n```properties\n2017-04-25 15:15:38,968 DEBUG [com.alibaba.dubbo.remoting.transport.DecodeHandler] -  [DUBBO] Decode decodeable message com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation, dubbo version: 2.5.3, current host: 127.0.0.1\n2017-04-25 15:15:39,484 DEBUG [com.crossoverJie.dubbo.filter.DubboTraceFilter] - dubbo请求数据:{\"args\":[1],\"interfaceName\":\"com.crossoverJie.api.UserInfoApi\",\"methodName\":\"getUserInfo\"}\n2017-04-25 15:15:39,484 INFO [com.crossoverJie.api.impl.UserInfoApiImpl] - 用户查询Id=1\n2017-04-25 15:15:39,505 DEBUG [org.mybatis.spring.SqlSessionUtils] - Creating a new SqlSession\n2017-04-25 15:15:39,525 DEBUG [org.mybatis.spring.SqlSessionUtils] - SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6f56b29] was not registered for synchronization because synchronization is not active\n2017-04-25 15:15:39,549 DEBUG [org.mybatis.spring.transaction.SpringManagedTransaction] - JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@778b3121] will not be managed by Spring\n2017-04-25 15:15:39,555 DEBUG [com.crossoverJie.api.dubbo.dao.T_userDao.selectByPrimaryKey] - ==\u003e  Preparing: select id, username, password,roleId from t_user where id = ? \n2017-04-25 15:15:39,591 DEBUG [com.crossoverJie.api.dubbo.dao.T_userDao.selectByPrimaryKey] - ==\u003e Parameters: 1(Integer)\n2017-04-25 15:15:39,616 DEBUG [com.crossoverJie.api.dubbo.dao.T_userDao.selectByPrimaryKey] - \u003c==      Total: 1\n2017-04-25 15:15:39,616 DEBUG [com.alibaba.druid.pool.PreparedStatementPool] - {conn-10003, pstmt-20000} enter cache\n2017-04-25 15:15:39,617 DEBUG [org.mybatis.spring.SqlSessionUtils] - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@6f56b29]\n2017-04-25 15:15:45,473 INFO [com.crossoverJie.dubbo.filter.DubboTraceFilter] - dubbo执行成功\n2017-04-25 15:15:45,476 DEBUG [com.crossoverJie.dubbo.filter.DubboTraceFilter] - dubbo返回数据{\"args\":[{\"id\":1,\"password\":\"123456\",\"roleId\":1,\"userName\":\"crossoverJie\"}],\"interfaceName\":\"com.crossoverJie.api.UserInfoApi\",\"methodName\":\"getUserInfo\"}\n```\n\n\n\n# 更多信息\n\n\n- [使用 `springBoot+SpringCloud`构建微服务项目](https://github.com/crossoverJie/springboot-cloud)\n- [Java 知识点](https://github.com/crossoverJie/Java-Interview)\n\n# 联系作者\n- [crossoverJie@gmail.com](mailto:crossoverJie@gmail.com)\n\n![](https://ws2.sinaimg.cn/large/006tKfTcly1fsa01u7ro1j30gs0howfq.jpg)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FcrossoverJie%2FSSM","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FcrossoverJie%2FSSM","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FcrossoverJie%2FSSM/lists"}