/span>
<span class="token punctuation">}</span>
</code></pre></div><h3 id="启动配置"><a href="#启动配置" class="header-anchor">#</a> 启动配置</h3> <p>最后,项目启动类添加相关注解，代码如下：</p> <div class="language-java extra-class"><pre class="language-java"><code><span class="token annotation punctuation">@EnableDiscoveryClient</span>
<span class="token annotation punctuation">@EnableEurekaClient</span>
<span class="token annotation punctuation">@SpringBootApplication</span>