[GitHub] zhengyangyong commented on a change in pull request #85: add easy-build-microservice-system-part-I blog

2018-05-17 Thread GitBox
zhengyangyong commented on a change in pull request #85: add 
easy-build-microservice-system-part-I blog
URL: 
https://github.com/apache/incubator-servicecomb-website/pull/85#discussion_r189150551
 
 

 ##
 File path: _posts/cn/2018-05-17-easy-build-microservice-system-part-I.md
 ##
 @@ -0,0 +1,91 @@
+---
+title: "轻松微服务系列:使用脚手架功能一键构建微服务"
+lang: cn
+ref: easy-build-microservice-system-part-I
+permalink: /cn/docs/easy-build-microservice-system-part-I/
+excerpt: "轻松微服务系列:使用脚手架功能一键构建微服务"
+last_modified_at: 2018-05-17T19:05:00+08:00
+author: Yangyong Zheng
+tags: [Archetypes, Scaffold]
+redirect_from:
+  - /theme-setup/
+---
+
+## 轻松微服务系列:使用脚手架功能一键构建微服务
+提到微服务,相信“程序猿”们已经不再陌生,估计大家都多少尝试过微服务框架,也遇到了不少“坑”直呼坑爹吧?实际上微服务的初衷正是为了“解放”开发者,使得系统构建的过程更加轻松愉快,所以我们开了这个“轻松微服务系列”,和大家一起愉快的走一遭!废话不多说,上菜:
+
+### 牛刀小试
+打开命令行,输入下面的命令:
+```bash
+mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 
-DarchetypeGroupId=org.apache.servicecomb.archetypes 
-DarchetypeArtifactId=business-service-jaxrs-archetype 
-DarchetypeVersion=1.0.0-m2-SNAPSHOT 
-DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
+```
+
+>提示:由于ServiceComb Archetypes还处于SNAPSHOT阶段,Repository托管在Apache 
Snapshots库中,所以下载速度会稍慢。
+
+之后按提示指定微服务的`groupId`,`artifactId`,`version`,`package`等信息,回车,一个新的微服务就创建好了:
+
+![Archetypes创建](/assets/images/scaffold/ArchetypesCreate.png)
+
+运行它也很简单,使用IDE打开项目,DEBUG -> Application.java,或在命令行:
+
+```bash
+#编译打包
+mvn package
+#切换到输出目录
+cd target
+#启动可执行jar包
+java -jar .jar
+```
+
+稍等微服务就启动好了,打开浏览器输入`http://localhost:8080/hello`验证一下:
+
+![输出hello](/assets/images/scaffold/OutputHello.png)
+
+是不是非常轻松呢?这份轻松来源我们使用Archetypes优化了构建过程,它是脚手架的基础。
+
 
 Review comment:
   Done


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zhengyangyong commented on a change in pull request #85: add easy-build-microservice-system-part-I blog

2018-05-17 Thread GitBox
zhengyangyong commented on a change in pull request #85: add 
easy-build-microservice-system-part-I blog
URL: 
https://github.com/apache/incubator-servicecomb-website/pull/85#discussion_r189150499
 
 

 ##
 File path: _posts/cn/2018-05-17-easy-build-microservice-system-part-I.md
 ##
 @@ -0,0 +1,91 @@
+---
+title: "轻松微服务系列:使用脚手架功能一键构建微服务"
+lang: cn
+ref: easy-build-microservice-system-part-I
+permalink: /cn/docs/easy-build-microservice-system-part-I/
+excerpt: "轻松微服务系列:使用脚手架功能一键构建微服务"
+last_modified_at: 2018-05-17T19:05:00+08:00
+author: Yangyong Zheng
+tags: [Archetypes, Scaffold]
+redirect_from:
+  - /theme-setup/
+---
+
+## 轻松微服务系列:使用脚手架功能一键构建微服务
+提到微服务,相信“程序猿”们已经不再陌生,估计大家都多少尝试过微服务框架,也遇到了不少“坑”直呼坑爹吧?实际上微服务的初衷正是为了“解放”开发者,使得系统构建的过程更加轻松愉快,所以我们开了这个“轻松微服务系列”,和大家一起愉快的走一遭!废话不多说,上菜:
+
+### 牛刀小试
 
 Review comment:
   Done


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zhengyangyong commented on a change in pull request #85: add easy-build-microservice-system-part-I blog

2018-05-17 Thread GitBox
zhengyangyong commented on a change in pull request #85: add 
easy-build-microservice-system-part-I blog
URL: 
https://github.com/apache/incubator-servicecomb-website/pull/85#discussion_r189150463
 
 

 ##
 File path: _posts/cn/2018-05-17-easy-build-microservice-system-part-I.md
 ##
 @@ -0,0 +1,91 @@
+---
+title: "轻松微服务系列:使用脚手架功能一键构建微服务"
+lang: cn
+ref: easy-build-microservice-system-part-I
+permalink: /cn/docs/easy-build-microservice-system-part-I/
+excerpt: "轻松微服务系列:使用脚手架功能一键构建微服务"
+last_modified_at: 2018-05-17T19:05:00+08:00
+author: Yangyong Zheng
+tags: [Archetypes, Scaffold]
+redirect_from:
+  - /theme-setup/
+---
+
+## 轻松微服务系列:使用脚手架功能一键构建微服务
+提到微服务,相信“程序猿”们已经不再陌生,估计大家都多少尝试过微服务框架,也遇到了不少“坑”直呼坑爹吧?实际上微服务的初衷正是为了“解放”开发者,使得系统构建的过程更加轻松愉快,所以我们开了这个“轻松微服务系列”,和大家一起愉快的走一遭!废话不多说,上菜:
+
+### 牛刀小试
+打开命令行,输入下面的命令:
+```bash
+mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 
-DarchetypeGroupId=org.apache.servicecomb.archetypes 
-DarchetypeArtifactId=business-service-jaxrs-archetype 
-DarchetypeVersion=1.0.0-m2-SNAPSHOT 
-DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
+```
+
+>提示:由于ServiceComb Archetypes还处于SNAPSHOT阶段,Repository托管在Apache 
Snapshots库中,所以下载速度会稍慢。
+
+之后按提示指定微服务的`groupId`,`artifactId`,`version`,`package`等信息,回车,一个新的微服务就创建好了:
+
+![Archetypes创建](/assets/images/scaffold/ArchetypesCreate.png)
+
+运行它也很简单,使用IDE打开项目,DEBUG -> Application.java,或在命令行:
+
+```bash
+#编译打包
+mvn package
+#切换到输出目录
+cd target
+#启动可执行jar包
+java -jar .jar
+```
+
+稍等微服务就启动好了,打开浏览器输入`http://localhost:8080/hello`验证一下:
+
+![输出hello](/assets/images/scaffold/OutputHello.png)
+
+是不是非常轻松呢?这份轻松来源我们使用Archetypes优化了构建过程,它是脚手架的基础。
+
+### 脚手架
+在建筑领域,脚手架是施工现场为方便工人操作并解决垂直和水平运输而搭设的各种支架以及平台。
+
+![scaffold](/assets/images/scaffold/Scaffold.jpg)
+
+在软件开发领域,它引申为预提供一些基础框架代码加速开发过程,避免从零开始构建项目。用户只需要依据需求场景选择合适的脚手架,然后填充定制的业务逻辑即可,不必再去处理一些基础功能,例如数据库连接、日志实现、RPC传输等。
+
+微服务框架一般都会提供脚手架功能,例如Spring,提供了Spring initializr:
+
+![SpringInitializr](/assets/images/scaffold/SpringInitializr.png)
+
+它集成了Spring Boot和Spring Cloud丰富的组件,不过比较遗憾的是它基本没有提供代码级别的示例,更像是一个**“POM组合器”**。
 
 Review comment:
   Done


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services