Giter Club home page Giter Club logo

bms's Introduction

bms

1、本项目采用springcloud开源框架搭建,其中springboot版本为:2.0.3.RELEASE,springcloud版本为:Finchley.RELEASE,oauth2鉴权在当前版本中是下发到各实际应用中调用鉴权中心来实现认证

2、目前使用的模块有:Eurzka,feign,springcloud gateway

3、bmsGateway中实现了动态路由(路由的增删改,路由数据存储于mysql中),同时在当前模块中将记录所有经过gateway网关的请求日志(目前输出到日志文件中,后续可根据实际需求存到mysql数据库中),gateway服务返回均为JSON

4、bmsGateway中提供的服务

1、查询所有生效路由地址:http://localhost:5555/actuator/gateway/routes;

2、手动加载数据库中路由:http://localhost:5555/refreshRoute;

5、服务间调用均通过feign调用gateway中定义的路由实现:localhost:3333/daily/dailyAmountCheck(目前测试的地址,通过日常模块调用年度模块),http://localhost:4444/annual/checkAnnualAmount(通过年度调用日常模块)

6、新增OAuth2模块颁发token用于后续的统一权限管理(本实例的用户密码暂时写死在Oauth2UserDetailsService方法中,密码为123456,client信息存在数据库中bms_oauth2.ddl,client密码为server,如果需要替换密码需要运行new BCryptPasswordEncoder().encode("新密码")替换ddl中的密码,密码加密方式使用的bcrypt),具体请求如下:

1、password模式:localhost:3355/oauth/token?client_id=password_client&client_secret=server&grant_type=password&username=admin1&password=123456

2、refresh_token模式:localhost:3355/oauth/token?client_id=password_client&client_secret=server&grant_type=refresh_token&refresh_token=cbd9b246-d7f1-46b9-af30-144e21663527

3、client_credentials模式:localhost:3355/oauth/token?client_id=client_credentials&client_secret=server&grant_type=client_credentials

4、authorization_code模式:

bms's People

Contributors

ouyang1203 avatar

Watchers

James Cloos 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.