资源简介
Spring微服务实战一书源码,从异步图书免费获取,本书以一个实际项目为主线,介绍云、微服务等概念以及Spring Boot和Spring Cloud等诸多Spring项目,并介绍如何将该项目一步一步地从单体架构重构成微服务架构,最终将这个项目拆分成众多微服务,让它们运行在各自的Docker容器中,实现持续集成/持续部署,并最终自动部署到云环境(亚马逊云)中。
代码片段和文件信息
import unittest
import logging
import json
import string
import argparse
import os
from httplib2 import Http
class TestConfigServer(unittest.TestCase):
def call_config_service(selfserviceNameserviceEnv):
targetUri = “http://{}:8888/{}/{}“.format(containerIPserviceNameserviceEnv)
http_obj = Http(“.cache“)
(resp content) = http_obj.request(
uri=targetUri
method=‘GET‘
headers={‘Content-Type‘: ‘application/json; charset=UTF-8‘ ‘connection‘: ‘close‘})
return respcontent
def test_licensingservice_aws_dev(self):
http_obj = Http(“.cache“)
(resp content) = self.call_config_service(“licensingservice““aws-dev“)
results = json.loads(content.decode(“utf-8“))
self.assertEqual(resp.status 200)
self.assertEquals(“https://github.com/carnellj/config-repo/licensingservice/licensingservice-aws-dev.yml“
results[“propertySources“][0][“name“])
def test_licensingservice_default(self):
http_obj = Http(“.cache“)
(resp content) = self.call_config_service(“licensingservice““default“)
results = json.loads(content.decode(“utf-8“))
self.assertEqual(resp.status 200)
self.assertEquals(“https://github.com/carnellj/config-repo/licensingservice/licensingservice.yml“
results[“propertySources“][0][“name“])
def test_organizationservice_default(self):
http_obj = Http(“.cache“)
(resp content) = self.call_config_service(“organizationservice““default“)
results = json.loads(content.decode(“utf-8“))
self.assertEqual(resp.status 200)
self.assertEquals(“https://github.com/carnellj/config-repo/organizationservice/organizationservice.yml“
results[“propertySources“][0][“name“])
def test_organizationservice_aws_dev(self):
http_obj = Http(“.cache“)
(resp content) = self.call_config_service(“organizationservice““aws-dev“)
results = json.loads(content.decode(“utf-8“))
self.assertEqual(resp.status 200)
self.assertEquals(“https://github.com/carnellj/config-repo/organizationservice/organizationservice-aws-dev.yml“
results[“propertySources“][0][“name“])
if __name__ == ‘__main__‘:
containerIP = os.getenv(‘CONTAINER_IP‘“192.168.99.100“)
print “Running config service platform tests against container ip: {}“.format(containerIP)
unittest.main()
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-06-02 04:42 final_code\
目录 0 2017-04-08 15:05 final_code\chapter10-platform-tests-master\
文件 201 2017-04-08 15:05 final_code\chapter10-platform-tests-master\.gitignore
文件 1936 2017-04-08 15:05 final_code\chapter10-platform-tests-master\.travis.yml
文件 130 2017-04-08 15:05 final_code\chapter10-platform-tests-master\run_all.sh
文件 2540 2017-04-08 15:05 final_code\chapter10-platform-tests-master\test_config_server.py
文件 1597 2017-04-08 15:05 final_code\chapter10-platform-tests-master\test_eureka_server.py
文件 4037 2017-04-08 15:05 final_code\chapter10-platform-tests-master\test_zuul_service.py
目录 0 2017-04-28 09:05 final_code\spmia-chapter1-master\
文件 17 2017-04-28 09:05 final_code\spmia-chapter1-master\.gitattributes
文件 194 2017-04-28 09:05 final_code\spmia-chapter1-master\.gitignore
文件 2034 2017-04-28 09:05 final_code\spmia-chapter1-master\.travis.yml
目录 0 2017-04-28 09:05 final_code\spmia-chapter1-master\docker\
目录 0 2017-04-28 09:05 final_code\spmia-chapter1-master\docker\common\
文件 128 2017-04-28 09:05 final_code\spmia-chapter1-master\docker\common\docker-compose.yml
文件 1111 2017-04-28 09:05 final_code\spmia-chapter1-master\pom.xm
文件 2084 2017-04-28 09:05 final_code\spmia-chapter1-master\README.md
目录 0 2017-04-28 09:05 final_code\spmia-chapter1-master\simpleservice\
文件 2816 2017-04-28 09:05 final_code\spmia-chapter1-master\simpleservice\pom.xm
目录 0 2017-04-28 09:05 final_code\spmia-chapter1-master\simpleservice\src\
目录 0 2017-04-28 09:05 final_code\spmia-chapter1-master\simpleservice\src\main\
目录 0 2017-04-28 09:05 final_code\spmia-chapter1-master\simpleservice\src\main\docker\
文件 234 2017-04-28 09:05 final_code\spmia-chapter1-master\simpleservice\src\main\docker\Dockerfile
文件 236 2017-04-28 09:05 final_code\spmia-chapter1-master\simpleservice\src\main\docker\run.sh
目录 0 2017-04-28 09:05 final_code\spmia-chapter1-master\simpleservice\src\main\java\
目录 0 2017-04-28 09:05 final_code\spmia-chapter1-master\simpleservice\src\main\java\com\
目录 0 2017-04-28 09:05 final_code\spmia-chapter1-master\simpleservice\src\main\java\com\thoughtmechanix\
目录 0 2017-04-28 09:05 final_code\spmia-chapter1-master\simpleservice\src\main\java\com\thoughtmechanix\simpleservice\
文件 933 2017-04-28 09:05 final_code\spmia-chapter1-master\simpleservice\src\main\java\com\thoughtmechanix\simpleservice\Application.java
目录 0 2017-05-13 11:36 final_code\spmia-chapter10-master\
文件 194 2017-05-13 11:36 final_code\spmia-chapter10-master\.gitignore
............此处省略1492个文件信息
- 上一篇:在线考试系统外文翻译
- 下一篇:cc debugger 驱动
相关资源
- 东城在线答疑系统
- Spring @Scheduled定时任务动态修改cron参
- Spring Boot+Vue全栈开发实战dpf,包含章
- SpringBoot+MongoDB+Echarts图表数据可视化
- guns全套资料
- SpringBoot集成Redis,Webservice,kafka,q
- springcloud+eureka+ribbon多服务负载均衡
- 开发环境相关配置说明文档
- Spring Cloud微服务实战源代码
- drools7.5.0和spring 4.3.12集成
- SpringBoot OAuth2
- springcloud 一整套,解压就能用
- spring+element+vue附件上传、及在线预览
- Springer的LNCS格式 是doc的
- springboot+jdbc增删改查.zip
- 简单的航班查询系统
- SpringSecurity开发安全的REST服务.txt
- Spring Web MVC外文翻译
- SpringBoot实战教程亲测非常好百度网盘
- docker利用nextcloud搭建一个私有百度云
- 尚学堂Spring学习笔记
- spring ioc+mvc代码
- 企业付款到个人零钱的源码demo
- 尚硅谷18年最新SpringBoot培训视频自动
- spring+springMvc简单实现SSO单点登录
-
毕设外文文献Spring fr
amework Fundamen - 毕设 外文文献翻译--Spring的web-MVC-构架
- 在线聊天系统ssh整合开发struts spring
- SpringBoot2.1.4+Mybatis+PageHelper整合
- springboot2.0+mybatis主从数据库双数据源
评论
共有 条评论