Code Monkey home page Code Monkey logo

fengzijk / calf-cloud Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 473 KB

calf-cloud是自己在工作中总结积累搭建的基于Spring Cloud微服务化开发平台的后端Java服务的开发脚手架.代码简洁,架构清晰,适合学习和直接项目中使用。 核心技术采用Spring Boot 2.4.6、Spring Cloud (2020.0.4)以及eureka 相关核心组件,目前在进一步完善中。 后续会推出SpringCloudAlibaba版本

License: Apache License 2.0

Java 100.00%
springcloud rabbitmq monggodb elasticsearch jwt ouath2 spring-security

calf-cloud's Introduction

calf-cloud

SpringBoot SpringCloud MybatusPlus Redission JAVA Maven badge

项目介绍

calf-cloud是自己在工作中总结积累搭建的基于Spring Cloud微服务化开发平台的后端Java服务的开发脚手架。 代码简洁,架构清晰,适合学习和直接项目中使用。 核心技术采用Spring Boot 2.4.6、Spring Cloud (2020.0.4)以及eureka 相关核心组件,目前在进一步完善中 后续会推出

nacos 分支与master分支是SpringCloudAlibaba版本

采用Spring Boot 2.6.6、Spring Cloud (2021.0.1) SpringCloudAlibaba(2021.0.1.0) nacos(1.4.3)

项目架构

项目结构

--- 更新中

1.0 swagger

  • 1.1 swagger配置与效果图

calf-cloud:
  springdoc:
    enabled: true
    info:
      title: 用户服务
      contact:
        name: fengzijk
        email: [email protected]
      description: 用户服务用来测试

image

2.0 全局异常及统一返回结果

  • 2.0.1 配置

# 全局处理结果过滤swagger以及系统包路径
global-response:
  adviceFilterPackage:
    - springfox.documentation
    - org.springframework
  • 2.0.2 返回异常示例

{
"code": 404,
"msg": "资源不存在",
"data": "No handler found for GET /api/userinfo/listUserIn",
"timestamp": 1633324501496,
"success": false
}

image

  • 2.0.3 返回结果示例

    @GetMapping("listUserInfo")
    @ApiOperation(value = "获取用户列表", httpMethod = "GET")
    public String listUserInfo() {
        return "sucess";
    }

image

calf-cloud's People

Contributors

fengzijk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.