Code Monkey home page Code Monkey logo

hero's Introduction

项目简介

  1. 服务端基于.net5平台,开发框架是基于surging.cloud(surging.cloud是在surging基础上进行二次开发的微服务框架)
  2. 采用mysql作为存储数据库、使用redis作为缓存数据库
  3. 服务之间使用dotnetty实现的rpc框架进行通信,服务调用支持缓存缓存拦截,极大的提高了系统性能
  4. 采用zookeeper作为服务注册中心;也支持consul作为服务注册中心(consul未经测试)
  5. hero权限管理系统支持菜单、操作、数据权限
  6. 前端使用vue2,基于element-admin框架进行开发
  7. 项目地址:

surging.cloud

  1. 增加异常处理模块,分为业务异常和非业务异常,rpc通信过程中,如果捕获到的是业务异常,被捕获之后服务消费者不会重试,且异常可以在服务之间进行传递,最终通过网关及时返回给调用者
  2. 通过 IdleStateHandler 提供的心跳功能重构服务健康检查,提高rpc通信的可靠性
  3. 通过 Rabbit.Zookeeper 重构基于zookeeper的服务注册中心,提高服务注册中心的可靠性
  4. 修复通过RpcContenxt获取rpc通信上下文参数存在的bug,新增ISurgingSession获取rpc通信上下文参数【通过该接口可以获取当前登录用户的上下文信息】
  5. 扩展了诸如Dapper、mongodb、AutoMapper、es、分布式锁等组件
  6. 对rpc通信模型进行调整,生成的webapi支持restful架构风格
  7. 使用JWT组件重构token签发方式、对登录认证、接口鉴权进行重构
  8. 其他

Demo部署

  • 地址: http://www.liuhl-hero.top
  • 账号:
    1. 管理员: admin 密码: 123qwe
    2. 普通用户: zhangsan 密码: 123qwe
    3. 使用admin登录后查看其它账号,密码均为:123qwe

服务介绍

当前共存在四个微服务:

  1. 认证与授权服务(Auth): 负责用户、角色、用户组、权限管理,完成等用户的登录认证、接口鉴权等功能
  2. 组织机构服务(Organization): 负责组织机构管理
  3. 基础数据服务(BasicData): 提供基础数据和系统配置等
  4. 网关(Gateway): 通过Kestrel主机对集群外部暴露Http访问端口,接收到客户端的请求后,将请求转到集群内部,与集群内部通过rpc进行通信

todo

  • hero支持租户、完成系统基础设置功能
  • 完善开发者文档
  • 完成hero的系统管理,支持查看微服务集群的服务状态、系统监控、服务链路跟踪、缓存数据等
  • 封装文件上传服务、定时作业任务管理服务、日志管理服务等
  • 封装基于ef的数据访问组件
  • 封装分布式事务组件

hero's People

Contributors

dependabot[bot] avatar liuhll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hero's Issues

将整个项目down下来,也可以运行起来,先把网关启动了,后启动了surging.hero.AuthHost服务,可以看到zookeeper中已经有了服务了。但是调用的时候显示“根据服务id:Surging.Hero.Auth.IApplication.User.IUserAppService.Get_id,找不到可用的服务提供者的地址”

您好,我是完全按照当前zookeeper来做服务注册的。surgingSetting.json的配置文件中我增加了EnginePartModule:ZookeeperModule,如下图所示:
image

因为不增加会提示说重复引用。增加了之后服务均可以启动起来。

但是我在用postman调用的时候报如下错误:

,报错的同时,我看了zookeeper中的服务信息,发现了如下ri'zh日志:
image

可以稍微出个运行教程吗

希望出个运行教程,本地一运行服务和网关就报错:服务主机Surging.Core.ServiceHosting启动失败,监听地址:169.254.58.195:100

全部设置好了,运行时经常报以下错误

配置如下:
image
image
image
错误如下:
Surging.Hero.FileServiceHost Warning: 0 : [2021-01-27 08:42:47.239 GMT WARNING ClientCnxn !!!Session 0x100012944f101c8 for server {hero.zoo1=>172.23.0.11:2181}, unexpected error, closing socket connection and attempting reconnect]
Exc level 0: org.apache.zookeeper.ClientCnxn+SessionExpiredException: Unable to reconnect to ZooKeeper service, session 0x100012944f101c8 has expired
at org.apache.zookeeper.ClientCnxn.onConnected(Int32 _negotiatedSessionTimeout, Int64 _sessionId, Byte[] _sessionPasswd, Boolean isRO)
at org.apache.zookeeper.ClientCnxnSocket.readConnectResult()
at org.apache.zookeeper.ClientCnxnSocketNIO.doIO()
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(Int32 waitTimeOut)
at org.apache.zookeeper.ClientCnxn.startSendTask()
image
此异常最初是在此调用堆栈中引发的:
Rabbit.Zookeeper.Implementation.ZookeeperClient.RetryUntilConnected(System.Func<System.Threading.Tasks.Task>)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Rabbit.Zookeeper.Implementation.ZookeeperClient.ExistsAsync(string)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
...
[调用堆栈已截断]

InnerException:None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Surging.Demo.Domain.Users.UserDomainService'

您好,我把服务启动之后,我是在Consul中注册发现的,但是在用postman调用的时候,总是报以上错误,您看您有时间帮忙分析一下吗?我折腾了半天,检测了所有该检测的内容,但是还是报错,每次我在debug的时候,发现HttpMessage类里面的属性ServiceKey一直都是null,导致最终在Getinstance的时候报异常!!!!
1
2
surging cloud[.net core 3.1]详细报错信息.txt

按钮权限

你好,请问权限可以控制到按钮吗

流程图

你好,请问有流程图和配置操作文档吗

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.