Giter VIP home page Giter VIP logo

tiny's Introduction

tiny

tiny意思微小的,本项目使用spring-boot、spring-cloud、spring-cloud-alibaba进行搭建

当前支持jdk1.8 spring-boot版本2.7.18,项目集成spring-cloud+alibaba,需要考虑版本兼容问题,见官网

组织结构

tiny
│
├─tiny-dependencies         -- 统一管理依赖,版本锁死
│
├─tiny-framework            -- 公共架构模块
│  ├─tiny-framework-cloud      -- spring-cloud核心依赖(nacos、openfegin、loadbalancer、cloud环境上下文、限流sentinel(待完成)、分布式事务seata(待完成) )
│  ├─tiny-framework-core       -- spring-boot核心依赖、常量类、通用返回类,工具类(各种工具类,hutool、guava),Body请求加密和响应处理、全局log(待完成)、全局接口耗时(待完成)
│  ├─tiny-framework-genertor   -- 代码生成器(mybatisplus模板、mybatis模板)
│  └──tiny-framework-starter   -- 开胃菜,自定义starter
│      ├─tiny-framework-starter-redis          -- redis-单数据源
│      ├─tiny-framework-starter-rabbit         -- rabbit依赖
│      ├─tiny-framework-starter-redisson       -- 封装redisson工具类
│      ├─tiny-framework-starter-mongo          -- mongo-单数据源,如果配置多个,在写一套就行了
│      └─tiny-framework-starter-xxl            -- xxl 
│
├─tiny-common              -- 公共业务模块(包含了core和业务的常量、枚举、通用repository)
│
├─tiny-api                 -- 公共api模块
│
├─tiny-gateway              -- 网关服务,路由规则、跨域、空白页改造,header解析token,token失效判断-redis(待完成),用户状态判断-fegin调用(待完成)
│  ├─xxx                    -- xxx
│  └─xxx                    -- xxx
│
├─tiny-demo                 -- 样例服务,添加新模块可当做参照,测试类有生成代码模板
│  ├─xxx                    -- xxx
│  └─xxx                    -- xxx
│
└─bbb  -- bbb

端口说明

服务名 端口 机器
gateway 8080 xx
example 10000 xx
order 10200 xx
pay 10100 xx

环境准备

本地添加nacos,如图 访问地址 nacos

说明

(1)新添加model可以参考example工程
(2)服务本地启动,需要先配置好nacos,然后配置Active Profiles=local,再启动 (2)访问url需要Header里添加Authorization,工具类JwtUtils.main方法生成 (3)主pom进行打包,进入样例服务jar包目录,执行java -jar -Dspring.profiles.active=local tiny-example-1.0-SNAPSHOT.jar可以正常启动

规范、配置、工具、问题相关文档

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.