# dingdangcat **Repository Path**: xiang-4931/dingdangcat ## Basic Information - **Project Name**: dingdangcat - **Description**: 叮铛猫会员商店项目 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: https://gitee.com/fan-zhixiang/dingdangcat.git - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-08-28 - **Last Updated**: 2022-10-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ddc ## 项目介绍 ### 项目演示 #### 后台管理系统 前端项目`vue-dingdangcat` ### 组织结构 ``` lua dingdangcat ├── ddc-common -- 工具类及通用代码 ├── ddc-mbg -- MyBatisGenerator生成的数据库操作代码 ├── ddc-auth -- 基于Spring Security Oauth2的统一的认证中心 ├── ddc-goods -- 商品管理 ├── ddc-search -- 基于Elasticsearch的商品搜索系统 ├── ddc-ams -- 后台登录系统 ├── ddc-order -- 订单管理 ├── ddc-gateway -- 网关 ├── ddc-cart -- 购物车 ├── ddc-stock -- 库存 ├── ddc-pojo -- 实体类 ├── ddc-resource -- 静态资源 ├── ddc-member -- 会员系统 ├── ddc-thirdpart -- 第三方对接 ├── ddc-log -- 日志 ├── ddc-portal -- 前台系统接口 └── ddc-demo -- 框架搭建时的测试代码 ``` ### 技术选型 #### 后端技术 | 技术 | 说明 | 官网 | | -------------------- | ------------------- | ---------------------------------------------- | | SpringBoot | 容器+MVC框架 | https://spring.io/projects/spring-boot | | SpringSecurity | 认证和授权框架 | https://spring.io/projects/spring-security | | MyBatis | ORM框架 | http://www.mybatis.org/mybatis-3/zh/index.html | | MyBatisGenerator | 数据层代码生成 | http://www.mybatis.org/generator/index.html | | Elasticsearch | 搜索引擎 | https://github.com/elastic/elasticsearch | | RabbitMQ | 消息队列 | https://www.rabbitmq.com/ | | Redis | 分布式缓存 | https://redis.io/ | | MongoDB | NoSql数据库 | https://www.mongodb.com | | LogStash | 日志收集工具 | https://github.com/elastic/logstash | | Kibana | 日志可视化查看工具 | https://github.com/elastic/kibana | | Nginx | 静态资源服务器 | https://www.nginx.com/ | | Docker | 应用容器引擎 | https://www.docker.com | | Jenkins | 自动化部署工具 | https://github.com/jenkinsci/jenkins | | Druid | 数据库连接池 | https://github.com/alibaba/druid | | OSS | 对象存储 | https://github.com/aliyun/aliyun-oss-java-sdk | | MinIO | 对象存储 | https://github.com/minio/minio | | JWT | JWT登录支持 | https://github.com/jwtk/jjwt | | Lombok | 简化对象封装工具 | https://github.com/rzwitserloot/lombok | | Hutool | Java工具类库 | https://github.com/looly/hutool | | PageHelper | MyBatis物理分页插件 | http://git.oschina.net/free/Mybatis_PageHelper | | Swagger-UI | 文档生成工具 | https://github.com/swagger-api/swagger-ui | | Hibernator-Validator | 验证框架 | http://hibernate.org/validator | #### 前端技术 | 技术 | 说明 | 官网 | | ---------- | --------------------- | -------------------------------------- | | Vue | 前端框架 | https://vuejs.org/ | | Vue-router | 路由框架 | https://router.vuejs.org/ | | Vuex | 全局状态管理框架 | https://vuex.vuejs.org/ | | Element | 前端UI框架 | https://element.eleme.io | | Axios | 前端HTTP框架 | https://github.com/axios/axios | | v-charts | 基于Echarts的图表框架 | https://v-charts.js.org/ | | Js-cookie | cookie管理工具 | https://github.com/js-cookie/js-cookie | | nprogress | 进度条控件 | https://github.com/rstacruz/nprogress | #### 模块介绍 SSO :10001 search:10008 order: 10005 goods:10004 gateway: 9090 ams: 10003 member:10002 #### Knife4j文档设置 首先在需要提供knife4j文档的module的pom文件中加入必要的依赖 ``` org.springframework.boot spring-boot-starter-web com.alibaba.cloud spring-cloud-starter-alibaba-nacos-discovery cn.hutool hutool-all 5.4.6 com.github.xiaoymin knife4j-micro-spring-boot-starter org.springframework.boot spring-boot-starter-validation ``` 然后在需要提供knife4j文档的module的config包下创建swagger的配置类如下: ```java @Configuration @EnableSwagger2WebMvc @Import(BeanValidatorPluginsConfiguration.class) public class SwaggerConfiguration { @Bean(value = "xxxApi") @Order(value = 1) public Docket groupRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(groupApiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("这里写controller路径xxx.xxx.xxx.controller")) .paths(PathSelectors.any()) .build(); } private ApiInfo groupApiInfo(){ return new ApiInfoBuilder() .title("ddc-xxx") .description("
swagger-bootstrap-ui-demo RESTful APIs
") .termsOfServiceUrl("http://www.group.com/") .contact("group@qq.com") .version("1.0") .build(); } } ``` 注意修改文件的Bean的value,controller路径和title等内容 然后在ddc-gateway模块中的配置文件中加入当前模块的routes 最后依次启动当前模块和ddc-gateway模块,访问localhost:9090/doc.html地址即可