简单微服务:基于spring boot和spring cloud的微服务

上传者: 42133918 | 上传时间: 2022-07-04 14:52:58 | 文件大小: 25KB | 文件类型: ZIP
一个简单的微服务 包含鉴权服务auth-service,网关服务gateway-service,业务层api-service 所有服务基于spring boot 2.2.0.RELEASE和spring cloud Hoxton.M3进行开发。 api-service是业务服务,提供业务接口,没有token验证; 通过gateway-service可以访问api-service的业务接口,并在gateway上实现了统一的用户认证; auth-service提供用户认证和用户鉴权能力。 认证服务 使用spring cloud oauth2,实现一个简单的基本的oauth2 provider 使用jwt令牌,使用自定义JwtTokenStore 提供/.well-known/jwks.json端点 网关服务 使用spring cloud gateway实现简单路由 作为oauth2资源服务器加入auth-service API服务 提供简单的Restful API,通过gateway-service调用 运行 依次运行auth-service,gateway-service,api-s

文件下载

资源详情

[{"title":"( 25 个子文件 25KB ) 简单微服务:基于spring boot和spring cloud的微服务","children":[{"title":"simple-microservices-master","children":[{"title":".gitignore <span style='color:#111;'> 6B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"pom.xml <span style='color:#111;'> 990B </span>","children":null,"spread":false},{"title":"api-service","children":[{"title":".gitignore <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":"pom.xml <span style='color:#111;'> 2.17KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"test","children":[{"title":"java","children":[{"title":"me","children":[{"title":"itwl","children":[{"title":"apiservice","children":[{"title":"ApiServiceApplicationTests.java <span style='color:#111;'> 214B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"application.yml <span style='color:#111;'> 20B </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"me","children":[{"title":"itwl","children":[{"title":"apiservice","children":[{"title":"ApiServiceApplication.java <span style='color:#111;'> 319B </span>","children":null,"spread":false},{"title":"controller","children":[{"title":"ApiController.java <span style='color:#111;'> 351B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"auth-service","children":[{"title":".gitignore <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":"pom.xml <span style='color:#111;'> 3.15KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"test","children":[{"title":"java","children":[{"title":"me","children":[{"title":"itwl","children":[{"title":"authservice","children":[{"title":"AuthServiceApplicationTests.java <span style='color:#111;'> 216B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"application.yml <span style='color:#111;'> 88B </span>","children":null,"spread":false},{"title":"demojwt.jks <span style='color:#111;'> 2.17KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"me","children":[{"title":"itwl","children":[{"title":"authservice","children":[{"title":"AuthServiceApplication.java <span style='color:#111;'> 322B </span>","children":null,"spread":false},{"title":"controller","children":[{"title":"MvcController.java <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false}],"spread":false},{"title":"config","children":[{"title":"WebSecurityConfigurer.java <span style='color:#111;'> 2.33KB </span>","children":null,"spread":false},{"title":"ResourceServerConfigurer.java <span style='color:#111;'> 955B </span>","children":null,"spread":false},{"title":"AuthorizationServerConfigurer.java <span style='color:#111;'> 2.78KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"gateway-service","children":[{"title":".gitignore <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":"pom.xml <span style='color:#111;'> 2.87KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"test","children":[{"title":"java","children":[{"title":"me","children":[{"title":"itwl","children":[{"title":"gatewayservice","children":[{"title":"GatewayServiceApplicationTests.java <span style='color:#111;'> 222B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"application.yml <span style='color:#111;'> 444B </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"me","children":[{"title":"itwl","children":[{"title":"gatewayservice","children":[{"title":"config","children":[{"title":"ResourceServerConfigurer.java <span style='color:#111;'> 754B </span>","children":null,"spread":false}],"spread":false},{"title":"GatewayServiceApplication.java <span style='color:#111;'> 331B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明