http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/blob/08e1b43f/content/cn/users/invoke-control/index.html ---------------------------------------------------------------------- diff --git a/content/cn/users/invoke-control/index.html b/content/cn/users/invoke-control/index.html new file mode 100644 index 0000000..ea3d274 --- /dev/null +++ b/content/cn/users/invoke-control/index.html @@ -0,0 +1,817 @@ +<!doctype html> +<!-- + Minimal Mistakes Jekyll Theme 4.4.1 by Michael Rose + Copyright 2017 Michael Rose - mademistakes.com | @mmistakes + Free for personal and commercial use under the MIT license + https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt +--> +<html lang="cn" class="no-js"> + <head> + <meta charset="utf-8"> + +<!-- begin SEO --> + + + + + + + + + +<title>è°ç¨æ§å¶ - Apache incubator ServiceComb</title> + + + + +<meta name="description" content="è°ç¨æ§å¶"> + + + + +<meta name="author" content=""> + +<meta property="og:locale" content="cn"> +<meta property="og:site_name" content="Apache incubator ServiceComb"> +<meta property="og:title" content="è°ç¨æ§å¶"> + + + <link rel="canonical" href="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/users/invoke-control/"> + <meta property="og:url" content="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/users/invoke-control/"> + + + + <meta property="og:description" content="è°ç¨æ§å¶"> + + + + <meta name="twitter:site" content="@ServiceComb"> + <meta name="twitter:title" content="è°ç¨æ§å¶"> + <meta name="twitter:description" content="è°ç¨æ§å¶"> + <meta name="twitter:url" content=""> + + + <meta name="twitter:card" content="summary"> + + + + + + + + + + + + + + + + + + + + + + + <script type="application/ld+json"> + { + "@context" : "http://schema.org", + "@type" : "Person", + "name" : "Apache incubator ServiceComb", + "url" : "http://github.com/pages/ServiceComb/servicesomb.github.io", + "sameAs" : null + } + </script> + + + + <meta name="google-site-verification" content="HvJjNd7vvJ-yjSTHlBiIWEYxp_Hrz-PYEY5Idz9LRcA" /> + + + + +<!-- end SEO --> + + +<link href="/feed.xml" type="application/atom+xml" rel="alternate" title="Apache incubator ServiceComb Feed"> + +<!-- http://t.co/dKP3o1e --> +<meta name="HandheldFriendly" content="True"> +<meta name="MobileOptimized" content="320"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> + +<script> + document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js '; +</script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js"></script> +<script src="/assets/js/prism.js"></script> + +<script type="text/javascript" async + src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"> +</script> + +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> + +<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> +<!-- For all browsers --> +<link rel="stylesheet" href="/assets/css/main.css"> +<link rel="stylesheet" href="/assets/css/prism.css"> + +<!--[if lte IE 9]> + <style> + /* old IE unsupported flexbox fixes */ + .greedy-nav .site-title { + padding-right: 3em; + } + .greedy-nav button { + position: absolute; + top: 0; + right: 0; + height: 100%; + } + </style> +<![endif]--> + +<meta http-equiv="cleartype" content="on"> + + <!-- start custom head snippets --> + +<!-- insert favicons. use http://realfavicongenerator.net/ --> +<link href="https://fonts.cat.net/css?family=Roboto:400,500,700|Source+Code+Pro" rel="stylesheet"> +<script src="/assets/js/custom.js"></script> +<!-- end custom head snippets --> + + </head> + + <body class="layout--single"> + + <!--[if lt IE 9]> +<div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div> +<![endif]--> + <div class="masthead"> + <div class="masthead__inner-wrap"> + <div class="masthead__menu"> + <nav id="site-nav" class="greedy-nav"> + + <a class="site-title active" href="/cn"><img src="//assets/images/ServiceComb-logo-1.png"></a> + + <ul class="visible-links"> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/docs/quick-start/">å¿«éå ¥é¨</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a class="active" href="/cn/users/">ç¨æ·æå</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/developers/">å¼åè æå</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/year-archive/">åæ</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/faqs/">常è§é®é¢</a> + + </li> + + </ul> + <button><div class="navicon"></div></button> + <ul class="hidden-links hidden"></ul> + <div class="nav-lang"> + + + + <a href=/users/invoke-control/>English</a> + + </div> + </nav> + </div> + </div> +</div> + + + + + + +<div id="main" role="main"> + + <div class="sidebar sticky"> + + <div class="back-to-home">é¦é¡µ > <a href="/cn/">ServiceComb</a></div> + + + + + + + + + + + +<nav class="nav__list"> + + <input id="ac-toc" name="accordion-toc" type="checkbox" /> + <label for="ac-toc">åæ¢èå</label> + <ul class="nav__items"> + + <li> + + <span class="nav__sub-title">ç¨æ·æå</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/" class="">Java Chassisç³»ç»æ¶æ</a></li> + + + + + + + + <li><a href="/cn/users/setup-environment/" class="">ç¯å¢é ç½®</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">å¼åæå¡æä¾è </span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/service-definition/" class="">æå¡å®ä¹</a></li> + + + + + + + + <li><a href="/cn/users/service-contract/" class="">æå¡å¥çº¦</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-springmvc/" class="">ç¨SpringMVCå¼åå¾®æå¡</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-jax-rs/" class="">ç¨JAX-RSå¼åå¾®æå¡</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-transparent-rpc/" class="">ç¨éæRPCå¼åå¾®æå¡</a></li> + + + + + + + + <li><a href="/cn/users/service-interface-constraints/" class="">æå¡æ¥å£çº¦æ</a></li> + + + + + + + + <li><a href="/cn/users/service-configurations/" class="">æå¡é ç½®</a></li> + + + + + + + + <li><a href="/cn/users/communicate-protocol/" class="">éä¿¡åè®®</a></li> + + + + + + + + <li><a href="/cn/users/application-boot-process/" class="">ç¨åºå¯å¨é»è¾</a></li> + + + + + + + + <li><a href="/cn/users/service-heartbeat/" class="">æå¡å¿è·³</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">å¼åæå¡æ¶è´¹è </span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/develop-with-rest-template/" class="">使ç¨Rest Templateæ¹å¼å¼å</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-rpc/" class="">使ç¨RPCæ¹å¼å¼å</a></li> + + + + + + + + <li><a href="/cn/users/use-service-contract/" class="">使ç¨æå¡å¥çº¦</a></li> + + + + + + + + <li><a href="/cn/users/invoke-control/" class="active">è°ç¨æ§å¶</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">éç¨å¼å</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/local-develop-test/" class="">æ¬å°å¼åä¸æµè¯</a></li> + + + + + + + + <li><a href="/cn/users/use-servicecomb-in-spring-boot/" class="">å¨Spring Bootä¸ä½¿ç¨ServiceComb</a></li> + + + + + + + + <li><a href="/cn/users/distributed-tracing/" class="">åå¸å¼è°ç¨é¾è¿½è¸ª</a></li> + + + + + + + + <li><a href="/cn/users/customized-tracing/" class="">èªå®ä¹è°ç¨é¾æç¹</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">æå¡è½åå¼æ¾</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/edging-service/nginx/" class="">使ç¨confdåNginxåè¾¹ç¼æå¡</a></li> + + + + + + + + <li><a href="/cn/users/edging-service/zuul/" class="">使ç¨Zuulåè¾¹ç¼æå¡</a></li> + + </ul> + + </li> + + <li> + + + + + <a href="/cn/users/metrics/"><span class="nav__sub-title nav__sub-title-with-url">çæ§</span></a> + + + + </li> + + <li> + + <span class="nav__sub-title">é¨ç½²</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/run-mode/" class="">è¿è¡æ¨¡å¼</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">å¾®æå¡å®å ¨</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/use-tls/" class="">使ç¨TLSéä¿¡</a></li> + + </ul> + + </li> + + </ul> +</nav> + + + + </div> + + + + <article class="page" itemscope itemtype="http://schema.org/CreativeWork"> + <meta itemprop="headline" content="è°ç¨æ§å¶"> + <meta itemprop="description" content="è°ç¨æ§å¶"> + + <meta itemprop="dateModified" content="August 15, 2017"> + + <div class="page__inner-wrap"> + + + <header> + <h1 class="page__title" itemprop="headline">è°ç¨æ§å¶ +</h1> + + </header> + + + + <section class="page__content" itemprop="text"> + <aside class="sidebar__right"> +<nav class="toc"> + <!-- <header><h4 class="nav__title"><i class="fa fa-file-text"></i> å¨æ¬é¡µä¸</h4></header> --> +<ul class="toc__menu" id="markdown-toc"> + <li><a href="#å®ä¾çº§æ éé离" id="markdown-toc-å®ä¾çº§æ éé离">å®ä¾çº§æ éé离</a> <ul> + <li><a href="#åºæ¯æè¿°" id="markdown-toc-åºæ¯æè¿°">åºæ¯æè¿°</a></li> + <li><a href="#é 置说æ" id="markdown-toc-é 置说æ">é 置说æ</a></li> + </ul> + </li> + <li><a href="#çæçç¥" id="markdown-toc-çæçç¥">çæçç¥</a> <ul> + <li><a href="#åºæ¯æè¿°-1" id="markdown-toc-åºæ¯æè¿°-1">åºæ¯æè¿°</a></li> + <li><a href="#é 置说æ-1" id="markdown-toc-é 置说æ-1">é 置说æ</a></li> + </ul> + </li> + <li><a href="#éæµçç¥" id="markdown-toc-éæµçç¥">éæµçç¥</a> <ul> + <li><a href="#åºæ¯æè¿°-2" id="markdown-toc-åºæ¯æè¿°-2">åºæ¯æè¿°</a></li> + <li><a href="#注æäºé¡¹" id="markdown-toc-注æäºé¡¹">注æäºé¡¹</a></li> + <li><a href="#é 置说æ-2" id="markdown-toc-é 置说æ-2">é 置说æ</a></li> + </ul> + </li> +</ul> + + </nav> +</aside> + +<h2 id="å®ä¾çº§æ éé离">å®ä¾çº§æ éé离</h2> + +<h3 id="åºæ¯æè¿°">åºæ¯æè¿°</h3> + +<p>å®ä¾çº§æ éé离åè½å 许å¨å¾®æå¡çé¨åå®ä¾è°ç¨å¤±è´¥æ¶ï¼åæ¢åæ éå®ä¾åé请æ±ï¼ä»èè¾¾å°é离æ éå®ä¾çåè½ã</p> + +<h3 id="é 置说æ">é 置说æ</h3> + +<p>å®ä¾çº§æ éé离åè½éæå¨è´è½½åè¡¡åè½ä¸ï¼è´è½½åè¡¡çç¥çé ç½®è§<a href="/cn/users/service-configurations/#è´è½½åè¡¡çç¥">è´è½½åè¡¡çç¥</a>ãè´è½½åè¡¡çç¥ä¸ï¼ä¸å®ä¾çº§æ éé离ç¸å ³çé 置项è§ä¸è¡¨ã</p> + +<table> + <thead> + <tr> + <th style="text-align: left">é 置项</th> + <th style="text-align: left">é»è®¤å¼</th> + <th style="text-align: left">åå¼èå´</th> + <th style="text-align: left">æ¯å¦å¿ é</th> + <th style="text-align: left">å«ä¹</th> + <th style="text-align: left">注æ</th> + </tr> + </thead> + <tbody> + <tr> + <td style="text-align: left">cse.loadbalance.isolation.enabled</td> + <td style="text-align: left">false</td> + <td style="text-align: left">Boolean</td> + <td style="text-align: left">å¦</td> + <td style="text-align: left">æ¯å¦å¼å¯æ éå®ä¾é离åè½</td> + <td style="text-align: left">-</td> + </tr> + <tr> + <td style="text-align: left">cse.loadbalance.isolation.enableRequestThreshold</td> + <td style="text-align: left">20</td> + <td style="text-align: left">Integer</td> + <td style="text-align: left">å¦</td> + <td style="text-align: left">å½å®ä¾çè°ç¨æ»æ¬¡æ°è¾¾å°è¯¥å¼æ¶å¼å§è¿å ¥é离é»è¾é¨æ§</td> + <td style="text-align: left">-</td> + </tr> + <tr> + <td style="text-align: left">cse.loadbalance.isolation.errorThresholdPercentage</td> + <td style="text-align: left">20</td> + <td style="text-align: left">Integerï¼åºé´ä¸º(0,100]</td> + <td style="text-align: left">å¦</td> + <td style="text-align: left">å®ä¾æ éé离é误ç¾åæ¯</td> + <td style="text-align: left">-</td> + </tr> + <tr> + <td style="text-align: left">cse.loadbalance.isolation.singleTestTime</td> + <td style="text-align: left">10000</td> + <td style="text-align: left">Integer</td> + <td style="text-align: left">å¦</td> + <td style="text-align: left">æ éå®ä¾åç¹æµè¯æ¶é´</td> + <td style="text-align: left"> </td> + </tr> + </tbody> +</table> + +<h2 id="çæçç¥">çæçç¥</h2> +<h3 id="åºæ¯æè¿°-1">åºæ¯æè¿°</h3> + +<p>çæçç¥æ¯å¯¹ServiceCombçæåè½ç设置ï¼ç¨æ·éè¿é ç½®çæçç¥å¯ä»¥æå®å¨ä½ç§æ¡ä»¶ä¸ServiceCombæ¡æ¶å°ç»æ¢åé请æ±ã</p> + +<h3 id="é 置说æ-1">é 置说æ</h3> + +<p>çæä½ä¸ºå¼å¸¸ååºæºå¶æ¯é级çç¥çä¸é¨åï¼ç¸å ³æ¦å¿µè¿æé离å容éãä¸è çå ³ç³»ä»¥åé ç½®æ¹å¼åè§<a href="/cn/users/service-configurations/#é级çç¥">é级çç¥</a>ã</p> + +<h2 id="éæµçç¥">éæµçç¥</h2> +<h3 id="åºæ¯æè¿°-2">åºæ¯æè¿°</h3> + +<p>ç¨æ·å¨consumer端使ç¨éæµçç¥ï¼å¯ä»¥éå¶åå¾æå®å¾®æå¡ç请æ±çé¢çã</p> + +<h3 id="注æäºé¡¹">注æäºé¡¹</h3> + +<p>åèæå¡æä¾è å¤<a href="/cn/users/service-configurations/#éæµçç¥">éæµçç¥æ³¨æäºé¡¹</a>ã</p> + +<h3 id="é 置说æ-2">é 置说æ</h3> + +<p>éæµçç¥é ç½®å¨microservice.yamlæ件ä¸ï¼ç¸å ³é 置项è§ä¸è¡¨ãè¦å¼å¯æå¡æ¶è´¹è 端çéæµçç¥ï¼è¿éè¦å¨å¤çé¾ä¸é ç½®æ¶è´¹ç«¯éæµhandlerï¼é 置示ä¾å¦ä¸ï¼</p> + +<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">cse</span><span class="pi">:</span> + <span class="s">handler</span><span class="pi">:</span> + <span class="s">chain</span><span class="pi">:</span> + <span class="s">Consumer</span><span class="pi">:</span> + <span class="s">default</span><span class="pi">:</span> <span class="s">qps-flowcontrol-consumer</span> +</code></pre> +</div> + +<p>QPSæµæ§é 置项说æ</p> + +<table> + <thead> + <tr> + <th style="text-align: left">é 置项</th> + <th style="text-align: left">é»è®¤å¼</th> + <th style="text-align: left">åå¼èå´</th> + <th style="text-align: left">æ¯å¦å¿ é</th> + <th style="text-align: left">å«ä¹</th> + <th style="text-align: left">注æ</th> + </tr> + </thead> + <tbody> + <tr> + <td style="text-align: left">cse.flowcontrol.Consumer.qps.enabled</td> + <td style="text-align: left">true</td> + <td style="text-align: left">Boolean</td> + <td style="text-align: left">å¦</td> + <td style="text-align: left">æ¯å¦å¯ç¨Consumeræµæ§</td> + <td style="text-align: left">-</td> + </tr> + <tr> + <td style="text-align: left">cse.flowcontrol.Consumer.qps.limit.[ServiceName].[Schema].[operation]</td> + <td style="text-align: left">2147483647 (max int)</td> + <td style="text-align: left">(0,2147483647]ï¼æ´å½¢</td> + <td style="text-align: left">å¦</td> + <td style="text-align: left">æ¯ç§éå 许ç请æ±æ°</td> + <td style="text-align: left">æ¯æmicroserviceãschemaãoperationä¸ä¸ªçº§å«çé ç½®</td> + </tr> + </tbody> +</table> + + + </section> + + <footer class="page__meta"> + + + + + + </footer> + + + + + + </div> + + + </article> + + + +</div> + + + <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> + <div align="center" style="margin: 0 0;"> + <ins class="adsbygoogle" + style="display:block; border-bottom: initial;" + data-ad-client="ca-pub-7328585512091257" + data-ad-slot="3049671934" + data-ad-format="auto"></ins> + </div> + + <div class="page__footer"> + <footer> + <!-- start custom footer snippets --> + +<!-- end custom footer snippets --> + <div class="container"> + <div class="row justify-content-md-center"> + + <div class="col"> + <ul> + <p class="header">èµæº</p> + <li><a href="/cn/docs/quick-start/">å¿«éå ¥é¨</a></li> + <li><a href="/cn/users/user-guide/">ç¨æ·æå</a></li> + <li><a href="/cn/slides/">èµæ</a></li> + <li><a href="/cn/users/faq/">常è§é®é¢</a></li> + </ul> + </div> + <div class="col"> + <ul> + <p class="header">è´¡ç®</p> + <li><a href="https://github.com/ServiceComb/ServiceComb.github.io/issues/new?title=Issue with _users/cn/invoke-control.md">æ¥åæ¬ç½é¡µé®é¢</a></li> + <li><a href="https://github.com/ServiceComb/ServiceComb.github.io/edit/master/_users/cn/invoke-control.md">å¨Githubä¸ç¼è¾æ¤é¡µ</a></li> + <li><a href="/cn/developers/submit-codes/">代ç æ交æå</a></li> + </ul> + </div> + <div class="col"> + <ul class="social-icons"> + <p class="header">社åº</p> + <li> + <a href="https://groups.google.com/forum/#!forum/servicecomb-developers" target="_blank"><span class="group">å¼åè </span></a> | + <a href="https://groups.google.com/forum/#!forum/servicecomb-users" target="_blank">ç¨æ·</span></a> + </li> + <li> + <a href="http://github.com/ServiceComb" target="_blank"><span class="github">Github</span></a> + </li> + <li> + <a href="https://twitter.com/ServiceComb" target="_blank"><span class="twitter">Twitter</span></a> + </li> + <li> + <a href="/feed.xml" target="_blank"><span class="rss">Feed</span></a> + </li> + </ul> + </div> + </div> +</div> +<div class="page__footer-bottom"> + <div>© 2017 Apache incubator ServiceComb. ææ¯æ¥èªäº <a href="http://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div> +</div> + + </footer> + </div> + + <script src="/assets/js/main.min.js"></script> + + + + + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-101622733-1', 'auto'); + ga('send', 'pageview'); +</script> + + + + + + + + </body> +</html>
http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/blob/08e1b43f/content/cn/users/local-develop-test/index.html ---------------------------------------------------------------------- diff --git a/content/cn/users/local-develop-test/index.html b/content/cn/users/local-develop-test/index.html new file mode 100644 index 0000000..edc586e --- /dev/null +++ b/content/cn/users/local-develop-test/index.html @@ -0,0 +1,760 @@ +<!doctype html> +<!-- + Minimal Mistakes Jekyll Theme 4.4.1 by Michael Rose + Copyright 2017 Michael Rose - mademistakes.com | @mmistakes + Free for personal and commercial use under the MIT license + https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt +--> +<html lang="cn" class="no-js"> + <head> + <meta charset="utf-8"> + +<!-- begin SEO --> + + + + + + + + + +<title>æ¬å°å¼åä¸æµè¯ - Apache incubator ServiceComb</title> + + + + +<meta name="description" content="æ¬å°å¼åä¸æµè¯"> + + + + +<meta name="author" content=""> + +<meta property="og:locale" content="cn"> +<meta property="og:site_name" content="Apache incubator ServiceComb"> +<meta property="og:title" content="æ¬å°å¼åä¸æµè¯"> + + + <link rel="canonical" href="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/users/local-develop-test/"> + <meta property="og:url" content="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/users/local-develop-test/"> + + + + <meta property="og:description" content="æ¬å°å¼åä¸æµè¯"> + + + + <meta name="twitter:site" content="@ServiceComb"> + <meta name="twitter:title" content="æ¬å°å¼åä¸æµè¯"> + <meta name="twitter:description" content="æ¬å°å¼åä¸æµè¯"> + <meta name="twitter:url" content=""> + + + <meta name="twitter:card" content="summary"> + + + + + + + + + + + + + + + + + + + + + + + <script type="application/ld+json"> + { + "@context" : "http://schema.org", + "@type" : "Person", + "name" : "Apache incubator ServiceComb", + "url" : "http://github.com/pages/ServiceComb/servicesomb.github.io", + "sameAs" : null + } + </script> + + + + <meta name="google-site-verification" content="HvJjNd7vvJ-yjSTHlBiIWEYxp_Hrz-PYEY5Idz9LRcA" /> + + + + +<!-- end SEO --> + + +<link href="/feed.xml" type="application/atom+xml" rel="alternate" title="Apache incubator ServiceComb Feed"> + +<!-- http://t.co/dKP3o1e --> +<meta name="HandheldFriendly" content="True"> +<meta name="MobileOptimized" content="320"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> + +<script> + document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js '; +</script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js"></script> +<script src="/assets/js/prism.js"></script> + +<script type="text/javascript" async + src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"> +</script> + +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> + +<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> +<!-- For all browsers --> +<link rel="stylesheet" href="/assets/css/main.css"> +<link rel="stylesheet" href="/assets/css/prism.css"> + +<!--[if lte IE 9]> + <style> + /* old IE unsupported flexbox fixes */ + .greedy-nav .site-title { + padding-right: 3em; + } + .greedy-nav button { + position: absolute; + top: 0; + right: 0; + height: 100%; + } + </style> +<![endif]--> + +<meta http-equiv="cleartype" content="on"> + + <!-- start custom head snippets --> + +<!-- insert favicons. use http://realfavicongenerator.net/ --> +<link href="https://fonts.cat.net/css?family=Roboto:400,500,700|Source+Code+Pro" rel="stylesheet"> +<script src="/assets/js/custom.js"></script> +<!-- end custom head snippets --> + + </head> + + <body class="layout--single"> + + <!--[if lt IE 9]> +<div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div> +<![endif]--> + <div class="masthead"> + <div class="masthead__inner-wrap"> + <div class="masthead__menu"> + <nav id="site-nav" class="greedy-nav"> + + <a class="site-title active" href="/cn"><img src="//assets/images/ServiceComb-logo-1.png"></a> + + <ul class="visible-links"> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/docs/quick-start/">å¿«éå ¥é¨</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a class="active" href="/cn/users/">ç¨æ·æå</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/developers/">å¼åè æå</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/year-archive/">åæ</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/faqs/">常è§é®é¢</a> + + </li> + + </ul> + <button><div class="navicon"></div></button> + <ul class="hidden-links hidden"></ul> + <div class="nav-lang"> + + + + <a href=/users/local-develop-test/>English</a> + + </div> + </nav> + </div> + </div> +</div> + + + + + + +<div id="main" role="main"> + + <div class="sidebar sticky"> + + <div class="back-to-home">é¦é¡µ > <a href="/cn/">ServiceComb</a></div> + + + + + + + + + + + +<nav class="nav__list"> + + <input id="ac-toc" name="accordion-toc" type="checkbox" /> + <label for="ac-toc">åæ¢èå</label> + <ul class="nav__items"> + + <li> + + <span class="nav__sub-title">ç¨æ·æå</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/" class="">Java Chassisç³»ç»æ¶æ</a></li> + + + + + + + + <li><a href="/cn/users/setup-environment/" class="">ç¯å¢é ç½®</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">å¼åæå¡æä¾è </span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/service-definition/" class="">æå¡å®ä¹</a></li> + + + + + + + + <li><a href="/cn/users/service-contract/" class="">æå¡å¥çº¦</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-springmvc/" class="">ç¨SpringMVCå¼åå¾®æå¡</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-jax-rs/" class="">ç¨JAX-RSå¼åå¾®æå¡</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-transparent-rpc/" class="">ç¨éæRPCå¼åå¾®æå¡</a></li> + + + + + + + + <li><a href="/cn/users/service-interface-constraints/" class="">æå¡æ¥å£çº¦æ</a></li> + + + + + + + + <li><a href="/cn/users/service-configurations/" class="">æå¡é ç½®</a></li> + + + + + + + + <li><a href="/cn/users/communicate-protocol/" class="">éä¿¡åè®®</a></li> + + + + + + + + <li><a href="/cn/users/application-boot-process/" class="">ç¨åºå¯å¨é»è¾</a></li> + + + + + + + + <li><a href="/cn/users/service-heartbeat/" class="">æå¡å¿è·³</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">å¼åæå¡æ¶è´¹è </span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/develop-with-rest-template/" class="">使ç¨Rest Templateæ¹å¼å¼å</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-rpc/" class="">使ç¨RPCæ¹å¼å¼å</a></li> + + + + + + + + <li><a href="/cn/users/use-service-contract/" class="">使ç¨æå¡å¥çº¦</a></li> + + + + + + + + <li><a href="/cn/users/invoke-control/" class="">è°ç¨æ§å¶</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">éç¨å¼å</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/local-develop-test/" class="active">æ¬å°å¼åä¸æµè¯</a></li> + + + + + + + + <li><a href="/cn/users/use-servicecomb-in-spring-boot/" class="">å¨Spring Bootä¸ä½¿ç¨ServiceComb</a></li> + + + + + + + + <li><a href="/cn/users/distributed-tracing/" class="">åå¸å¼è°ç¨é¾è¿½è¸ª</a></li> + + + + + + + + <li><a href="/cn/users/customized-tracing/" class="">èªå®ä¹è°ç¨é¾æç¹</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">æå¡è½åå¼æ¾</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/edging-service/nginx/" class="">使ç¨confdåNginxåè¾¹ç¼æå¡</a></li> + + + + + + + + <li><a href="/cn/users/edging-service/zuul/" class="">使ç¨Zuulåè¾¹ç¼æå¡</a></li> + + </ul> + + </li> + + <li> + + + + + <a href="/cn/users/metrics/"><span class="nav__sub-title nav__sub-title-with-url">çæ§</span></a> + + + + </li> + + <li> + + <span class="nav__sub-title">é¨ç½²</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/run-mode/" class="">è¿è¡æ¨¡å¼</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">å¾®æå¡å®å ¨</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/use-tls/" class="">使ç¨TLSéä¿¡</a></li> + + </ul> + + </li> + + </ul> +</nav> + + + + </div> + + + + <article class="page" itemscope itemtype="http://schema.org/CreativeWork"> + <meta itemprop="headline" content="æ¬å°å¼åä¸æµè¯"> + <meta itemprop="description" content="æ¬å°å¼åä¸æµè¯"> + + <meta itemprop="dateModified" content="August 15, 2017"> + + <div class="page__inner-wrap"> + + + <header> + <h1 class="page__title" itemprop="headline">æ¬å°å¼åä¸æµè¯ +</h1> + + </header> + + + + <section class="page__content" itemprop="text"> + <aside class="sidebar__right"> +<nav class="toc"> + <!-- <header><h4 class="nav__title"><i class="fa fa-file-text"></i> å¨æ¬é¡µä¸</h4></header> --> +<ul class="toc__menu" id="markdown-toc"> + <li><a href="#æ¦å¿µéè¿°" id="markdown-toc-æ¦å¿µéè¿°">æ¦å¿µéè¿°</a></li> + <li><a href="#å¯å¨æ¬å°æå¡ä¸å¿" id="markdown-toc-å¯å¨æ¬å°æå¡ä¸å¿">å¯å¨æ¬å°æå¡ä¸å¿</a></li> + <li><a href="#mockæºå¶å¯å¨æå¡ä¸å¿" id="markdown-toc-mockæºå¶å¯å¨æå¡ä¸å¿">Mockæºå¶å¯å¨æå¡ä¸å¿</a></li> +</ul> + + </nav> +</aside> + +<h2 id="æ¦å¿µéè¿°">æ¦å¿µéè¿°</h2> + +<p>æ¬å°èä»ç»å¦ä½å¨å¼åè æ¬å°è¿è¡æ¶è´¹è /æä¾è åºç¨çå¼åè°è¯ãå¼åæå¡æä¾è 请åè<a href="/cn/users/service-definition/">å¼åæå¡æä¾è ç« è</a>ï¼å¼åæå¡æ¶è´¹è 请åè<a href="/cn/users/develop-with-rest-template/">å¼åæå¡æ¶è´¹è ç« è</a>ãæå¡æä¾è åæ¶è´¹æä¾è åéè¦è¿æ¥å°å¨è¿ç¨çæå¡ä¸å¿ï¼ä¸ºäºæ¬å°å¾®æå¡çå¼ååè°è¯ï¼æ¬å°èä»ç»äºä¸¤ç§æ建æ¬å°æå¡ä¸å¿çæ¹æ³è¿è¡æ¬å°å¾®æå¡è°è¯ï¼</p> + +<ul> + <li> + <p><a href="#å¯å¨æ¬å°æå¡ä¸å¿">å¯å¨æ¬å°æå¡ä¸å¿</a>ã</p> + </li> + <li> + <p><a href="#mockæºå¶å¯å¨æå¡ä¸å¿">éè¿local file模æå¯å¨æå¡ä¸å¿Mockæºå¶</a>ã</p> + </li> +</ul> + +<p>æå¡ä¸å¿æ¯å¾®æå¡æ¡æ¶ä¸çéè¦ç»ä»¶ï¼ç¨äºæå¡å æ°æ®ä»¥åæå¡å®ä¾å æ°æ®ç管çåå¤ç注åãåç°ãæå¡ä¸å¿ä¸å¾®æå¡æä¾/æ¶è´¹è çé»è¾å ³ç³»ä¸å¾æ示ï¼</p> + +<p><img src="/assets/images/local_develop_test.png" alt="" /></p> + +<h2 id="å¯å¨æ¬å°æå¡ä¸å¿">å¯å¨æ¬å°æå¡ä¸å¿</h2> + +<ul> + <li> + <p><strong>æ¥éª¤1</strong> å¯å¨æ¬å°æå¡ä¸å¿ï¼å¯åè<a href="/cn/users/setup-environment/#è¿è¡service-center">è¿è¡Service Centeræå</a>ã</p> + </li> + <li> + <p><strong>æ¥éª¤ 2</strong> å¯å¨æ¬å°è½»éæå¡ä¸å¿åï¼å¨æå¡æä¾/æ¶è´¹è çmicroservice.yamlæ件ä¸é ç½®ServerCenterçå°åå端å£ï¼ç¤ºä¾ä»£ç ï¼</p> + + <div class="language-yaml highlighter-rouge"><pre class="highlight"><code> <span class="s">cse</span><span class="pi">:</span> + <span class="s">service</span><span class="pi">:</span> + <span class="s">registry</span><span class="pi">:</span> + <span class="s">address</span><span class="pi">:</span> <span class="s">http://127.0.0.1:30100</span> <span class="c1">#æå¡ä¸å¿å°åå端å£</span> +</code></pre> + </div> + </li> + <li> + <p><strong>æ¥éª¤ 3</strong> å¼åæå¡æä¾/æ¶è´¹è ï¼å¯å¨å¾®æå¡è¿è¡æ¬å°æµè¯ã</p> + </li> +</ul> + +<h2 id="mockæºå¶å¯å¨æå¡ä¸å¿">Mockæºå¶å¯å¨æå¡ä¸å¿</h2> + +<ul> + <li> + <p><strong>æ¥éª¤ 1</strong>æ°å»ºæ¬å°æå¡ä¸å¿å®ä¹æ件registry.yamlï¼å 容å¦ä¸ï¼</p> + + <div class="language-yaml highlighter-rouge"><pre class="highlight"><code> <span class="s">springmvctest</span><span class="pi">:</span> + <span class="pi">-</span> <span class="s">id</span><span class="pi">:</span> <span class="s2">"</span><span class="s">001"</span> + <span class="s">version</span><span class="pi">:</span> <span class="s2">"</span><span class="s">1.0"</span> + <span class="s">appid</span><span class="pi">:</span> <span class="s">myapp</span> <span class="c1">#è°è¯çæå¡id</span> + <span class="s">instances</span><span class="pi">:</span> + <span class="s">endpoints</span><span class="pi">:</span> + <span class="s">rest://127.0.0.1:8080</span> +</code></pre> + </div> + + <p>注æï¼mockæºå¶éè¦èªå·±åå¤å¥çº¦ï¼å¹¶ä¸å½ååªæ¯æå¨æ¬å°è¿è¡æå¡æ¶è´¹ç«¯(consumer)侧çè°è¯ï¼ä¸æ¯ææå¡æä¾è (provider)</p> + </li> + <li> + <p><strong>æ¥éª¤ 2</strong>å¨æå¡æ¶è´¹è Mainå½æ°é¦æ«æ·»å å¦ä¸ä»£ç ï¼</p> + + <div class="language-java highlighter-rouge"><pre class="highlight"><code> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">xxxClient</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="o">{</span> + <span class="n">System</span><span class="o">.</span><span class="na">setProperty</span><span class="o">(</span><span class="s">"local.registry.file"</span><span class="o">,</span> <span class="s">"/path/registry.yaml"</span><span class="o">);</span> + <span class="c1">//your code</span> + <span class="n">System</span><span class="o">.</span><span class="na">clearProperty</span><span class="o">(</span><span class="s">"local.registry.file"</span><span class="o">);</span> + <span class="o">}</span> +</code></pre> + </div> + </li> +</ul> + +<p>setProperty第äºä¸ªåæ°å¡«åregistry.yamlçç³»ç»ç»å¯¹è·¯å¾ï¼æ³¨æåºåå¨ä¸åç³»ç»ä¸ä½¿ç¨å¯¹åºçè·¯å¾åé符ã</p> + +<ul> + <li><strong>æ¥éª¤ 3</strong>å¼åæå¡æ¶è´¹è ï¼å¯å¨å¾®æå¡è¿è¡æ¬å°æµè¯ã</li> +</ul> + + + </section> + + <footer class="page__meta"> + + + + + + </footer> + + + + + + </div> + + + </article> + + + +</div> + + + <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> + <div align="center" style="margin: 0 0;"> + <ins class="adsbygoogle" + style="display:block; border-bottom: initial;" + data-ad-client="ca-pub-7328585512091257" + data-ad-slot="3049671934" + data-ad-format="auto"></ins> + </div> + + <div class="page__footer"> + <footer> + <!-- start custom footer snippets --> + +<!-- end custom footer snippets --> + <div class="container"> + <div class="row justify-content-md-center"> + + <div class="col"> + <ul> + <p class="header">èµæº</p> + <li><a href="/cn/docs/quick-start/">å¿«éå ¥é¨</a></li> + <li><a href="/cn/users/user-guide/">ç¨æ·æå</a></li> + <li><a href="/cn/slides/">èµæ</a></li> + <li><a href="/cn/users/faq/">常è§é®é¢</a></li> + </ul> + </div> + <div class="col"> + <ul> + <p class="header">è´¡ç®</p> + <li><a href="https://github.com/ServiceComb/ServiceComb.github.io/issues/new?title=Issue with _users/cn/local-develop-test.md">æ¥åæ¬ç½é¡µé®é¢</a></li> + <li><a href="https://github.com/ServiceComb/ServiceComb.github.io/edit/master/_users/cn/local-develop-test.md">å¨Githubä¸ç¼è¾æ¤é¡µ</a></li> + <li><a href="/cn/developers/submit-codes/">代ç æ交æå</a></li> + </ul> + </div> + <div class="col"> + <ul class="social-icons"> + <p class="header">社åº</p> + <li> + <a href="https://groups.google.com/forum/#!forum/servicecomb-developers" target="_blank"><span class="group">å¼åè </span></a> | + <a href="https://groups.google.com/forum/#!forum/servicecomb-users" target="_blank">ç¨æ·</span></a> + </li> + <li> + <a href="http://github.com/ServiceComb" target="_blank"><span class="github">Github</span></a> + </li> + <li> + <a href="https://twitter.com/ServiceComb" target="_blank"><span class="twitter">Twitter</span></a> + </li> + <li> + <a href="/feed.xml" target="_blank"><span class="rss">Feed</span></a> + </li> + </ul> + </div> + </div> +</div> +<div class="page__footer-bottom"> + <div>© 2017 Apache incubator ServiceComb. ææ¯æ¥èªäº <a href="http://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div> +</div> + + </footer> + </div> + + <script src="/assets/js/main.min.js"></script> + + + + + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-101622733-1', 'auto'); + ga('send', 'pageview'); +</script> + + + + + + + + </body> +</html> http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/blob/08e1b43f/content/cn/users/metrics/index.html ---------------------------------------------------------------------- diff --git a/content/cn/users/metrics/index.html b/content/cn/users/metrics/index.html new file mode 100644 index 0000000..913efbc --- /dev/null +++ b/content/cn/users/metrics/index.html @@ -0,0 +1,749 @@ +<!doctype html> +<!-- + Minimal Mistakes Jekyll Theme 4.4.1 by Michael Rose + Copyright 2017 Michael Rose - mademistakes.com | @mmistakes + Free for personal and commercial use under the MIT license + https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt +--> +<html lang="cn" class="no-js"> + <head> + <meta charset="utf-8"> + +<!-- begin SEO --> + + + + + + + + + +<title>Metricsçæ§ - Apache incubator ServiceComb</title> + + + + +<meta name="description" content="Metricsçæ§"> + + + + +<meta name="author" content=""> + +<meta property="og:locale" content="cn"> +<meta property="og:site_name" content="Apache incubator ServiceComb"> +<meta property="og:title" content="Metricsçæ§"> + + + <link rel="canonical" href="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/users/metrics/"> + <meta property="og:url" content="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/users/metrics/"> + + + + <meta property="og:description" content="Metricsçæ§"> + + + + <meta name="twitter:site" content="@ServiceComb"> + <meta name="twitter:title" content="Metricsçæ§"> + <meta name="twitter:description" content="Metricsçæ§"> + <meta name="twitter:url" content=""> + + + <meta name="twitter:card" content="summary"> + + + + + + + + + + + + + + + + + + + + + + + <script type="application/ld+json"> + { + "@context" : "http://schema.org", + "@type" : "Person", + "name" : "Apache incubator ServiceComb", + "url" : "http://github.com/pages/ServiceComb/servicesomb.github.io", + "sameAs" : null + } + </script> + + + + <meta name="google-site-verification" content="HvJjNd7vvJ-yjSTHlBiIWEYxp_Hrz-PYEY5Idz9LRcA" /> + + + + +<!-- end SEO --> + + +<link href="/feed.xml" type="application/atom+xml" rel="alternate" title="Apache incubator ServiceComb Feed"> + +<!-- http://t.co/dKP3o1e --> +<meta name="HandheldFriendly" content="True"> +<meta name="MobileOptimized" content="320"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> + +<script> + document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js '; +</script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js"></script> +<script src="/assets/js/prism.js"></script> + +<script type="text/javascript" async + src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"> +</script> + +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> + +<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> +<!-- For all browsers --> +<link rel="stylesheet" href="/assets/css/main.css"> +<link rel="stylesheet" href="/assets/css/prism.css"> + +<!--[if lte IE 9]> + <style> + /* old IE unsupported flexbox fixes */ + .greedy-nav .site-title { + padding-right: 3em; + } + .greedy-nav button { + position: absolute; + top: 0; + right: 0; + height: 100%; + } + </style> +<![endif]--> + +<meta http-equiv="cleartype" content="on"> + + <!-- start custom head snippets --> + +<!-- insert favicons. use http://realfavicongenerator.net/ --> +<link href="https://fonts.cat.net/css?family=Roboto:400,500,700|Source+Code+Pro" rel="stylesheet"> +<script src="/assets/js/custom.js"></script> +<!-- end custom head snippets --> + + </head> + + <body class="layout--single"> + + <!--[if lt IE 9]> +<div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div> +<![endif]--> + <div class="masthead"> + <div class="masthead__inner-wrap"> + <div class="masthead__menu"> + <nav id="site-nav" class="greedy-nav"> + + <a class="site-title active" href="/cn"><img src="//assets/images/ServiceComb-logo-1.png"></a> + + <ul class="visible-links"> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/docs/quick-start/">å¿«éå ¥é¨</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a class="active" href="/cn/users/">ç¨æ·æå</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/developers/">å¼åè æå</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/year-archive/">åæ</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/faqs/">常è§é®é¢</a> + + </li> + + </ul> + <button><div class="navicon"></div></button> + <ul class="hidden-links hidden"></ul> + <div class="nav-lang"> + + + + <a href=/users/metrics/>English</a> + + </div> + </nav> + </div> + </div> +</div> + + + + + + +<div id="main" role="main"> + + <div class="sidebar sticky"> + + <div class="back-to-home">é¦é¡µ > <a href="/cn/">ServiceComb</a></div> + + + + + + + + + + + +<nav class="nav__list"> + + <input id="ac-toc" name="accordion-toc" type="checkbox" /> + <label for="ac-toc">åæ¢èå</label> + <ul class="nav__items"> + + <li> + + <span class="nav__sub-title">ç¨æ·æå</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/" class="">Java Chassisç³»ç»æ¶æ</a></li> + + + + + + + + <li><a href="/cn/users/setup-environment/" class="">ç¯å¢é ç½®</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">å¼åæå¡æä¾è </span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/service-definition/" class="">æå¡å®ä¹</a></li> + + + + + + + + <li><a href="/cn/users/service-contract/" class="">æå¡å¥çº¦</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-springmvc/" class="">ç¨SpringMVCå¼åå¾®æå¡</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-jax-rs/" class="">ç¨JAX-RSå¼åå¾®æå¡</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-transparent-rpc/" class="">ç¨éæRPCå¼åå¾®æå¡</a></li> + + + + + + + + <li><a href="/cn/users/service-interface-constraints/" class="">æå¡æ¥å£çº¦æ</a></li> + + + + + + + + <li><a href="/cn/users/service-configurations/" class="">æå¡é ç½®</a></li> + + + + + + + + <li><a href="/cn/users/communicate-protocol/" class="">éä¿¡åè®®</a></li> + + + + + + + + <li><a href="/cn/users/application-boot-process/" class="">ç¨åºå¯å¨é»è¾</a></li> + + + + + + + + <li><a href="/cn/users/service-heartbeat/" class="">æå¡å¿è·³</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">å¼åæå¡æ¶è´¹è </span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/develop-with-rest-template/" class="">使ç¨Rest Templateæ¹å¼å¼å</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-rpc/" class="">使ç¨RPCæ¹å¼å¼å</a></li> + + + + + + + + <li><a href="/cn/users/use-service-contract/" class="">使ç¨æå¡å¥çº¦</a></li> + + + + + + + + <li><a href="/cn/users/invoke-control/" class="">è°ç¨æ§å¶</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">éç¨å¼å</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/local-develop-test/" class="">æ¬å°å¼åä¸æµè¯</a></li> + + + + + + + + <li><a href="/cn/users/use-servicecomb-in-spring-boot/" class="">å¨Spring Bootä¸ä½¿ç¨ServiceComb</a></li> + + + + + + + + <li><a href="/cn/users/distributed-tracing/" class="">åå¸å¼è°ç¨é¾è¿½è¸ª</a></li> + + + + + + + + <li><a href="/cn/users/customized-tracing/" class="">èªå®ä¹è°ç¨é¾æç¹</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">æå¡è½åå¼æ¾</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/edging-service/nginx/" class="">使ç¨confdåNginxåè¾¹ç¼æå¡</a></li> + + + + + + + + <li><a href="/cn/users/edging-service/zuul/" class="">使ç¨Zuulåè¾¹ç¼æå¡</a></li> + + </ul> + + </li> + + <li> + + + + + <a href="/cn/users/metrics/"><span class="nav__sub-title nav__sub-title-with-url">çæ§</span></a> + + + + </li> + + <li> + + <span class="nav__sub-title">é¨ç½²</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/run-mode/" class="">è¿è¡æ¨¡å¼</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">å¾®æå¡å®å ¨</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/use-tls/" class="">使ç¨TLSéä¿¡</a></li> + + </ul> + + </li> + + </ul> +</nav> + + + + </div> + + + + <article class="page" itemscope itemtype="http://schema.org/CreativeWork"> + <meta itemprop="headline" content="Metricsçæ§"> + <meta itemprop="description" content="Metricsçæ§"> + + <meta itemprop="dateModified" content="November 29, 2017"> + + <div class="page__inner-wrap"> + + + <header> + <h1 class="page__title" itemprop="headline">Metricsçæ§ +</h1> + + </header> + + + + <section class="page__content" itemprop="text"> + <aside class="sidebar__right"> +<nav class="toc"> + <!-- <header><h4 class="nav__title"><i class="fa fa-file-text"></i> å¨æ¬é¡µä¸</h4></header> --> +<ul class="toc__menu" id="markdown-toc"> + <li><a href="#å¦ä½é ç½®" id="markdown-toc-å¦ä½é ç½®">å¦ä½é ç½®</a></li> + <li><a href="#注æäºé¡¹" id="markdown-toc-注æäºé¡¹">注æäºé¡¹</a></li> + <li><a href="#æ件è¾åº" id="markdown-toc-æ件è¾åº">æ件è¾åº</a></li> +</ul> + + </nav> +</aside> + +<p>å¾®æå¡æ¡æ¶ä»0.4.1çæ¬å¼å§æ¯æçæ§åè½Metricsï¼è¯·æ³¨æè¿ä¸ªåè½è¿å¤äºå¼åï¼Previewï¼é¶æ®µï¼è¯·ä¸è¦é¨ç½²å°ç产ç¯å¢ï¼å¹¶ä¸æ们æªæ¥ä¼åè¾å¤§çè°æ´ï¼æ´å¤è®¨è®ºä¼æç»åå¸å¨<a href="https://groups.google.com/forum/#!forum/servicecomb-developers">Google Group</a>ä¸ã</p> +<h2 id="å¦ä½é ç½®">å¦ä½é ç½®</h2> +<p>请å¨microservice.yamlä¸æ·»å å¦ä¸é 置项ï¼</p> +<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">APPLICATION_ID</span><span class="pi">:</span> <span class="s">demo</span> +<span class="s">service_description</span><span class="pi">:</span> + <span class="s">name</span><span class="pi">:</span> <span class="s">demoService</span> + <span class="s">version</span><span class="pi">:</span> <span class="s">0.0.1</span> + +<span class="s">servicecomb</span><span class="pi">:</span> + <span class="s">metrics</span><span class="pi">:</span> + <span class="c1">#metricsæ°æ®ééæ¶é´ï¼åæ ·æ¯åæ件é´éï¼ï¼åä½ç§</span> + <span class="s">polltime</span><span class="pi">:</span> <span class="s">5</span> + <span class="c1">#å¦æmetricæ¯æµ®ç¹æ°ï¼è¾åºç»æä¿çå ä½å°æ°ï¼é»è®¤ä¸º1</span> + <span class="s">round_places</span><span class="pi">:</span> <span class="s">1</span> + <span class="s">file</span><span class="pi">:</span> + <span class="c1">#æ¯å¦å¯ç¨æ件è¾åº</span> + <span class="s">enabled</span><span class="pi">:</span> <span class="s">true</span> + <span class="c1">#è¾åºæ件çæ ¹ç®å½</span> + <span class="s">root_path</span><span class="pi">:</span> <span class="s">D:/Temp</span> + <span class="c1">#metricsæ件çåç¼</span> + <span class="s">name_prefix</span><span class="pi">:</span> <span class="s">demo.demoService</span> + <span class="c1">#metricsæ件Rollingæ大大å°ï¼é»è®¤10MBï¼ä¾å¦10KBï¼10MBï¼10GB</span> + <span class="s">max_rolling_size</span><span class="pi">:</span> <span class="s">10MB</span> + <span class="c1">#metricsæ件Rollingæ件ä¿åæ°éï¼é»è®¤10个</span> + <span class="s">max_rolling_count</span><span class="pi">:</span> <span class="s">10</span> +</code></pre> +</div> + +<h2 id="注æäºé¡¹">注æäºé¡¹</h2> +<ul> + <li>å¦æ使ç¨ServiceComb Spring Boot Startå¿«éæ建项ç®ï¼éè¦æé¤log4j-over-slf4jä¾èµ + <div class="language-xml highlighter-rouge"><pre class="highlight"><code> <span class="nt"><dependency></span> + <span class="nt"><groupId></span>org.springframework.boot<span class="nt"></groupId></span> + <span class="nt"><artifactId></span>spring-boot-starter<span class="nt"></artifactId></span> + <span class="c"><!--Metric使ç¨log4jè¾åºï¼å±è½æspring-boot-starterä¸çlog4j-over-slf4j--></span> + <span class="nt"><exclusions></span> + <span class="nt"><exclusion></span> + <span class="nt"><groupId></span>org.slf4j<span class="nt"></groupId></span> + <span class="nt"><artifactId></span>log4j-over-slf4j<span class="nt"></artifactId></span> + <span class="nt"></exclusion></span> + <span class="nt"></exclusions></span> + <span class="nt"></dependency></span> +</code></pre> + </div> + </li> + <li>éè¦å¨provideræ²»çé¾ä¸æ·»å bizkeeper-providerï¼å¦åTPSåLatencyæ æ°æ® + <div class="language-yaml highlighter-rouge"><pre class="highlight"><code> <span class="s">APPLICATION_ID</span><span class="pi">:</span> <span class="s">demo</span> + <span class="s">service_description</span><span class="pi">:</span> + <span class="s">name</span><span class="pi">:</span> <span class="s">demoService</span> + <span class="s">version</span><span class="pi">:</span> <span class="s">0.0.1</span> + <span class="s">cse</span><span class="pi">:</span> + <span class="s">handler</span><span class="pi">:</span> + <span class="s">chain</span><span class="pi">:</span> + <span class="s">Provider</span><span class="pi">:</span> + <span class="s">default</span><span class="pi">:</span> <span class="s">bizkeeper-provider</span> +</code></pre> + </div> + </li> +</ul> + +<h2 id="æ件è¾åº">æ件è¾åº</h2> +<p>æ¯ä¸ä¸ªæ件就æ¯ä¸ä¸ªå¾®æå¡ç¤ºä¾çº§å«çmetricsæ°æ®è¾åºï¼</p> + +<p><img src="/assets/images/metrics-output.png" alt="Metricså¾ç" /></p> + + + </section> + + <footer class="page__meta"> + + + + + + </footer> + + + + + + </div> + + + </article> + + + +</div> + + + <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> + <div align="center" style="margin: 0 0;"> + <ins class="adsbygoogle" + style="display:block; border-bottom: initial;" + data-ad-client="ca-pub-7328585512091257" + data-ad-slot="3049671934" + data-ad-format="auto"></ins> + </div> + + <div class="page__footer"> + <footer> + <!-- start custom footer snippets --> + +<!-- end custom footer snippets --> + <div class="container"> + <div class="row justify-content-md-center"> + + <div class="col"> + <ul> + <p class="header">èµæº</p> + <li><a href="/cn/docs/quick-start/">å¿«éå ¥é¨</a></li> + <li><a href="/cn/users/user-guide/">ç¨æ·æå</a></li> + <li><a href="/cn/slides/">èµæ</a></li> + <li><a href="/cn/users/faq/">常è§é®é¢</a></li> + </ul> + </div> + <div class="col"> + <ul> + <p class="header">è´¡ç®</p> + <li><a href="https://github.com/ServiceComb/ServiceComb.github.io/issues/new?title=Issue with _users/cn/Metrics.md">æ¥åæ¬ç½é¡µé®é¢</a></li> + <li><a href="https://github.com/ServiceComb/ServiceComb.github.io/edit/master/_users/cn/Metrics.md">å¨Githubä¸ç¼è¾æ¤é¡µ</a></li> + <li><a href="/cn/developers/submit-codes/">代ç æ交æå</a></li> + </ul> + </div> + <div class="col"> + <ul class="social-icons"> + <p class="header">社åº</p> + <li> + <a href="https://groups.google.com/forum/#!forum/servicecomb-developers" target="_blank"><span class="group">å¼åè </span></a> | + <a href="https://groups.google.com/forum/#!forum/servicecomb-users" target="_blank">ç¨æ·</span></a> + </li> + <li> + <a href="http://github.com/ServiceComb" target="_blank"><span class="github">Github</span></a> + </li> + <li> + <a href="https://twitter.com/ServiceComb" target="_blank"><span class="twitter">Twitter</span></a> + </li> + <li> + <a href="/feed.xml" target="_blank"><span class="rss">Feed</span></a> + </li> + </ul> + </div> + </div> +</div> +<div class="page__footer-bottom"> + <div>© 2017 Apache incubator ServiceComb. ææ¯æ¥èªäº <a href="http://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div> +</div> + + </footer> + </div> + + <script src="/assets/js/main.min.js"></script> + + + + + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-101622733-1', 'auto'); + ga('send', 'pageview'); +</script> + + + + + + + + </body> +</html> http://git-wip-us.apache.org/repos/asf/incubator-servicecomb-website/blob/08e1b43f/content/cn/users/run-mode/index.html ---------------------------------------------------------------------- diff --git a/content/cn/users/run-mode/index.html b/content/cn/users/run-mode/index.html new file mode 100644 index 0000000..38522b9 --- /dev/null +++ b/content/cn/users/run-mode/index.html @@ -0,0 +1,772 @@ +<!doctype html> +<!-- + Minimal Mistakes Jekyll Theme 4.4.1 by Michael Rose + Copyright 2017 Michael Rose - mademistakes.com | @mmistakes + Free for personal and commercial use under the MIT license + https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt +--> +<html lang="cn" class="no-js"> + <head> + <meta charset="utf-8"> + +<!-- begin SEO --> + + + + + + + + + +<title>è¿è¡æ¨¡å¼ - Apache incubator ServiceComb</title> + + + + +<meta name="description" content="è¿è¡æ¨¡å¼"> + + + + +<meta name="author" content=""> + +<meta property="og:locale" content="cn"> +<meta property="og:site_name" content="Apache incubator ServiceComb"> +<meta property="og:title" content="è¿è¡æ¨¡å¼"> + + + <link rel="canonical" href="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/users/run-mode/"> + <meta property="og:url" content="http://github.com/pages/ServiceComb/servicesomb.github.io/cn/users/run-mode/"> + + + + <meta property="og:description" content="è¿è¡æ¨¡å¼"> + + + + <meta name="twitter:site" content="@ServiceComb"> + <meta name="twitter:title" content="è¿è¡æ¨¡å¼"> + <meta name="twitter:description" content="è¿è¡æ¨¡å¼"> + <meta name="twitter:url" content=""> + + + <meta name="twitter:card" content="summary"> + + + + + + + + + + + + + + + + + + + + + + + <script type="application/ld+json"> + { + "@context" : "http://schema.org", + "@type" : "Person", + "name" : "Apache incubator ServiceComb", + "url" : "http://github.com/pages/ServiceComb/servicesomb.github.io", + "sameAs" : null + } + </script> + + + + <meta name="google-site-verification" content="HvJjNd7vvJ-yjSTHlBiIWEYxp_Hrz-PYEY5Idz9LRcA" /> + + + + +<!-- end SEO --> + + +<link href="/feed.xml" type="application/atom+xml" rel="alternate" title="Apache incubator ServiceComb Feed"> + +<!-- http://t.co/dKP3o1e --> +<meta name="HandheldFriendly" content="True"> +<meta name="MobileOptimized" content="320"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> + +<script> + document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js '; +</script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js"></script> +<script src="/assets/js/prism.js"></script> + +<script type="text/javascript" async + src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"> +</script> + +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> + +<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> +<!-- For all browsers --> +<link rel="stylesheet" href="/assets/css/main.css"> +<link rel="stylesheet" href="/assets/css/prism.css"> + +<!--[if lte IE 9]> + <style> + /* old IE unsupported flexbox fixes */ + .greedy-nav .site-title { + padding-right: 3em; + } + .greedy-nav button { + position: absolute; + top: 0; + right: 0; + height: 100%; + } + </style> +<![endif]--> + +<meta http-equiv="cleartype" content="on"> + + <!-- start custom head snippets --> + +<!-- insert favicons. use http://realfavicongenerator.net/ --> +<link href="https://fonts.cat.net/css?family=Roboto:400,500,700|Source+Code+Pro" rel="stylesheet"> +<script src="/assets/js/custom.js"></script> +<!-- end custom head snippets --> + + </head> + + <body class="layout--single"> + + <!--[if lt IE 9]> +<div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div> +<![endif]--> + <div class="masthead"> + <div class="masthead__inner-wrap"> + <div class="masthead__menu"> + <nav id="site-nav" class="greedy-nav"> + + <a class="site-title active" href="/cn"><img src="//assets/images/ServiceComb-logo-1.png"></a> + + <ul class="visible-links"> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/docs/quick-start/">å¿«éå ¥é¨</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a class="active" href="/cn/users/">ç¨æ·æå</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/developers/">å¼åè æå</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/year-archive/">åæ</a> + + </li> + + + <li class="masthead__menu-item"> + + + + <a href="/cn/faqs/">常è§é®é¢</a> + + </li> + + </ul> + <button><div class="navicon"></div></button> + <ul class="hidden-links hidden"></ul> + <div class="nav-lang"> + + + + <a href=/users/run-mode/>English</a> + + </div> + </nav> + </div> + </div> +</div> + + + + + + +<div id="main" role="main"> + + <div class="sidebar sticky"> + + <div class="back-to-home">é¦é¡µ > <a href="/cn/">ServiceComb</a></div> + + + + + + + + + + + +<nav class="nav__list"> + + <input id="ac-toc" name="accordion-toc" type="checkbox" /> + <label for="ac-toc">åæ¢èå</label> + <ul class="nav__items"> + + <li> + + <span class="nav__sub-title">ç¨æ·æå</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/" class="">Java Chassisç³»ç»æ¶æ</a></li> + + + + + + + + <li><a href="/cn/users/setup-environment/" class="">ç¯å¢é ç½®</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">å¼åæå¡æä¾è </span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/service-definition/" class="">æå¡å®ä¹</a></li> + + + + + + + + <li><a href="/cn/users/service-contract/" class="">æå¡å¥çº¦</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-springmvc/" class="">ç¨SpringMVCå¼åå¾®æå¡</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-jax-rs/" class="">ç¨JAX-RSå¼åå¾®æå¡</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-transparent-rpc/" class="">ç¨éæRPCå¼åå¾®æå¡</a></li> + + + + + + + + <li><a href="/cn/users/service-interface-constraints/" class="">æå¡æ¥å£çº¦æ</a></li> + + + + + + + + <li><a href="/cn/users/service-configurations/" class="">æå¡é ç½®</a></li> + + + + + + + + <li><a href="/cn/users/communicate-protocol/" class="">éä¿¡åè®®</a></li> + + + + + + + + <li><a href="/cn/users/application-boot-process/" class="">ç¨åºå¯å¨é»è¾</a></li> + + + + + + + + <li><a href="/cn/users/service-heartbeat/" class="">æå¡å¿è·³</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">å¼åæå¡æ¶è´¹è </span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/develop-with-rest-template/" class="">使ç¨Rest Templateæ¹å¼å¼å</a></li> + + + + + + + + <li><a href="/cn/users/develop-with-rpc/" class="">使ç¨RPCæ¹å¼å¼å</a></li> + + + + + + + + <li><a href="/cn/users/use-service-contract/" class="">使ç¨æå¡å¥çº¦</a></li> + + + + + + + + <li><a href="/cn/users/invoke-control/" class="">è°ç¨æ§å¶</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">éç¨å¼å</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/local-develop-test/" class="">æ¬å°å¼åä¸æµè¯</a></li> + + + + + + + + <li><a href="/cn/users/use-servicecomb-in-spring-boot/" class="">å¨Spring Bootä¸ä½¿ç¨ServiceComb</a></li> + + + + + + + + <li><a href="/cn/users/distributed-tracing/" class="">åå¸å¼è°ç¨é¾è¿½è¸ª</a></li> + + + + + + + + <li><a href="/cn/users/customized-tracing/" class="">èªå®ä¹è°ç¨é¾æç¹</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">æå¡è½åå¼æ¾</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/edging-service/nginx/" class="">使ç¨confdåNginxåè¾¹ç¼æå¡</a></li> + + + + + + + + <li><a href="/cn/users/edging-service/zuul/" class="">使ç¨Zuulåè¾¹ç¼æå¡</a></li> + + </ul> + + </li> + + <li> + + + + + <a href="/cn/users/metrics/"><span class="nav__sub-title nav__sub-title-with-url">çæ§</span></a> + + + + </li> + + <li> + + <span class="nav__sub-title">é¨ç½²</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/run-mode/" class="active">è¿è¡æ¨¡å¼</a></li> + + </ul> + + </li> + + <li> + + <span class="nav__sub-title">å¾®æå¡å®å ¨</span> + + + + <ul> + + + + + + + + <li><a href="/cn/users/use-tls/" class="">使ç¨TLSéä¿¡</a></li> + + </ul> + + </li> + + </ul> +</nav> + + + + </div> + + + + <article class="page" itemscope itemtype="http://schema.org/CreativeWork"> + <meta itemprop="headline" content="è¿è¡æ¨¡å¼"> + <meta itemprop="description" content="è¿è¡æ¨¡å¼"> + + <meta itemprop="dateModified" content="June 06, 2017"> + + <div class="page__inner-wrap"> + + + <header> + <h1 class="page__title" itemprop="headline">è¿è¡æ¨¡å¼ +</h1> + + </header> + + + + <section class="page__content" itemprop="text"> + <aside class="sidebar__right"> +<nav class="toc"> + <!-- <header><h4 class="nav__title"><i class="fa fa-file-text"></i> å¨æ¬é¡µä¸</h4></header> --> +<ul class="toc__menu" id="markdown-toc"> + <li><a href="#standalone模å¼" id="markdown-toc-standalone模å¼">standalone模å¼</a> <ul> + <li><a href="#æä½æ¥éª¤" id="markdown-toc-æä½æ¥éª¤">æä½æ¥éª¤</a></li> + </ul> + </li> + <li><a href="#web容å¨æ¨¡å¼" id="markdown-toc-web容å¨æ¨¡å¼">WEB容å¨æ¨¡å¼</a> <ul> + <li><a href="#å¼å示ä¾" id="markdown-toc-å¼å示ä¾">å¼å示ä¾</a></li> + </ul> + </li> +</ul> + + </nav> +</aside> + +<p>å¾®æå¡æ¡æ¶å½åæä¾äºä¸¤ç§é¨ç½²è¿è¡æ¨¡å¼ï¼standalone模å¼åweb容å¨æ¨¡å¼ãæ¨è使ç¨<strong>standalone模å¼</strong>æèµ·æå¡è¿ç¨ã</p> +<h2 id="standalone模å¼">standalone模å¼</h2> +<p>ä¸ä¸ªStandaloneç容å¨ï¼ä»¥ç®åçMainå è½½Springå¯å¨ï¼å 为æå¡é常ä¸éè¦Tomcat/JBossçWeb容å¨çç¹æ§ï¼æ²¡å¿ è¦ç¨Web容å¨å»å è½½æå¡ãå¾®æ¡æ¶æä¾äºstandaloneé¨ç½²è¿è¡æ¨¡å¼ï¼æå¡å®¹å¨åªæ¯ä¸ä¸ªç®åçMainæ¹æ³ï¼å¹¶å è½½ä¸ä¸ªç®åçSpring容å¨ï¼ç¨äºæ´é²æå¡ã</p> + +<h3 id="æä½æ¥éª¤">æä½æ¥éª¤</h3> + +<ul> + <li> + <p><strong>æ¥éª¤1</strong> ç¼åMainå½æ°ï¼åå§åæ¥å¿åå è½½æå¡é ç½®ï¼å 容å¦ä¸ï¼</p> + + <div class="language-java highlighter-rouge"><pre class="highlight"><code> <span class="kn">import</span> <span class="nn">io.servicecomb.foundation.common.utils.BeanUtils</span><span class="o">;</span> + <span class="kn">import</span> <span class="nn">io.servicecomb.foundation.common.utils.Log4jUtils</span><span class="o">;</span> + <span class="kd">public</span> <span class="kd">class</span> <span class="nc">MainServer</span> <span class="o">{</span> + <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">Exception</span> <span class="o">{</span> + <span class="err">ã</span><span class="n">Log4jUtils</span><span class="o">.</span><span class="na">init</span><span class="o">();</span> <span class="err">#æ¥å¿åå§å</span> + <span class="err">ã</span><span class="n">BeanUtils</span><span class="o">.</span><span class="na">init</span><span class="o">();</span> <span class="err">#</span> <span class="n">Spring</span> <span class="n">bean</span><span class="err">åå§å</span> + <span class="c1">// other codes omitted</span> + <span class="o">}</span> + <span class="o">}</span> +</code></pre> + </div> + </li> + <li> + <p><strong>æ¥éª¤2</strong> è¿è¡MainServerå³å¯å¯å¨è¯¥å¾®æå¡è¿ç¨ï¼åå¤æ´é²æå¡ã</p> + + <p>注æï¼å¦æ使ç¨çæ¯restç½ç»ééï¼éè¦å°pomä¸çtransportæ¹ä¸ºä½¿ç¨cse-transport-rest-vertxå ã</p> + </li> +</ul> + +<h2 id="web容å¨æ¨¡å¼">WEB容å¨æ¨¡å¼</h2> +<p>å¦æéè¦å°è¯¥å¾®æå¡å è½½å°web容å¨ä¸å¯å¨è¿è¡æ¶ï¼éè¦æ°å»ºä¸ä¸ªservletå·¥ç¨å è£ ä¸ä¸ï¼è¯¥servletå·¥ç¨ï¼æ ¹æ®éè¦ï¼å¯ä»¥ä¸åæåå°éçå¼å¯¼ä»£ç å³å¯ã</p> + +<h3 id="å¼å示ä¾">å¼å示ä¾</h3> + +<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span class="nt"><web-app></span> + <span class="nt"><context-param></span> + <span class="nt"><param-name></span>contextConfigLocation<span class="nt"></param-name></span> + <span class="nt"><param-value></span> + classpath*:META-INF/spring/*.bean.xml + classpath*:app-config.xml + <span class="nt"></param-value></span> + <span class="nt"></context-param></span> + <span class="nt"><listener></span> + <span class="nt"><listener-class></span>io.servicecomb.transport.rest.servlet.RestServletContextListener<span class="nt"></listener-class></span> + <span class="nt"></listener></span> + + <span class="nt"><servlet></span> + <span class="nt"><servlet-name></span>RestServlet<span class="nt"></servlet-name></span> + <span class="nt"><servlet-class></span>io.servicecomb.transport.rest.servlet.RestServlet<span class="nt"></servlet-class></span> + <span class="nt"><load-on-startup></span>1<span class="nt"></load-on-startup></span> + <span class="nt"><async-supported></span>true<span class="nt"></async-supported></span> + <span class="nt"></servlet></span> + <span class="nt"><servlet-mapping></span> + <span class="nt"><servlet-name></span>RestServlet<span class="nt"></servlet-name></span> + <span class="nt"><url-pattern></span>/rest/*<span class="nt"></url-pattern></span> + <span class="nt"></servlet-mapping></span> +<span class="nt"></web-app></span> +</code></pre> +</div> + +<ul> + <li><strong>æ¥éª¤2 ä¿®æ¹pomæ件</strong></li> +</ul> + +<div class="language-xml highlighter-rouge"><pre class="highlight"><code><span class="nt"><dependencies></span> + <span class="nt"><dependency></span> + <span class="nt"><groupId></span>io.servicecomb<span class="nt"></groupId></span> + <span class="nt"><artifactId></span>transport-rest-servlet<span class="nt"></artifactId></span> + <span class="nt"></dependency></span> +<span class="nt"></dependencies></span> +<span class="nt"><build></span> + <span class="nt"><finalName></span>test<span class="nt"></finalName></span> +<span class="nt"></build></span> +</code></pre> +</div> + +<p><strong>注æäºé¡¹:</strong></p> +<ol> + <li>RESTfulè°ç¨åºè¯¥ä¸web容å¨ä¸å ¶ä»éæèµæºè°ç¨ï¼æ¯å¦htmlãjsççï¼é离å¼æ¥ï¼æ以webrootåä¸æ®µåºè¯¥è¿æä¸å±å ³é®åï¼æ¯å¦ä¸é¢web.xmlä¸ä¸¾çä¾åï¼/test/restï¼ä¸çrestã</li> + <li>以tomcat为ä¾ï¼é»è®¤æ¯ä¸ªwarå é½æä¸åçwebrootï¼è¿ä¸ªwebrootéè¦æ¯basePathçåç¼ï¼æ¯å¦webroot为testï¼å该微æå¡ææçå¥çº¦é½å¿ 须以/testæ头ã</li> + <li>å½å¾®æå¡å è½½å¨web容å¨ä¸ï¼å¹¶ç´æ¥ä½¿ç¨web容å¨å¼çhttpãhttps端å£æ¶ï¼å 为æ¯ä½¿ç¨çweb容å¨çéä¿¡ééï¼æ以éè¦æ»¡è¶³web容å¨çè§åã</li> +</ol> + + + </section> + + <footer class="page__meta"> + + + + + + </footer> + + + + + + </div> + + + </article> + + + +</div> + + + <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> + <div align="center" style="margin: 0 0;"> + <ins class="adsbygoogle" + style="display:block; border-bottom: initial;" + data-ad-client="ca-pub-7328585512091257" + data-ad-slot="3049671934" + data-ad-format="auto"></ins> + </div> + + <div class="page__footer"> + <footer> + <!-- start custom footer snippets --> + +<!-- end custom footer snippets --> + <div class="container"> + <div class="row justify-content-md-center"> + + <div class="col"> + <ul> + <p class="header">èµæº</p> + <li><a href="/cn/docs/quick-start/">å¿«éå ¥é¨</a></li> + <li><a href="/cn/users/user-guide/">ç¨æ·æå</a></li> + <li><a href="/cn/slides/">èµæ</a></li> + <li><a href="/cn/users/faq/">常è§é®é¢</a></li> + </ul> + </div> + <div class="col"> + <ul> + <p class="header">è´¡ç®</p> + <li><a href="https://github.com/ServiceComb/ServiceComb.github.io/issues/new?title=Issue with _users/cn/deployment.md">æ¥åæ¬ç½é¡µé®é¢</a></li> + <li><a href="https://github.com/ServiceComb/ServiceComb.github.io/edit/master/_users/cn/deployment.md">å¨Githubä¸ç¼è¾æ¤é¡µ</a></li> + <li><a href="/cn/developers/submit-codes/">代ç æ交æå</a></li> + </ul> + </div> + <div class="col"> + <ul class="social-icons"> + <p class="header">社åº</p> + <li> + <a href="https://groups.google.com/forum/#!forum/servicecomb-developers" target="_blank"><span class="group">å¼åè </span></a> | + <a href="https://groups.google.com/forum/#!forum/servicecomb-users" target="_blank">ç¨æ·</span></a> + </li> + <li> + <a href="http://github.com/ServiceComb" target="_blank"><span class="github">Github</span></a> + </li> + <li> + <a href="https://twitter.com/ServiceComb" target="_blank"><span class="twitter">Twitter</span></a> + </li> + <li> + <a href="/feed.xml" target="_blank"><span class="rss">Feed</span></a> + </li> + </ul> + </div> + </div> +</div> +<div class="page__footer-bottom"> + <div>© 2017 Apache incubator ServiceComb. ææ¯æ¥èªäº <a href="http://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div> +</div> + + </footer> + </div> + + <script src="/assets/js/main.min.js"></script> + + + + + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-101622733-1', 'auto'); + ga('send', 'pageview'); +</script> + + + + + + + + </body> +</html>