(转载请注明来源:cnblogs coder-fang)

本实例包括Nacos服务发现,配置中心,sentinel 容断简单使用,Spring cloud alibaba 的dubbo实例及所有服务的docker部署。

  • 创建三个Maven独立工程,接口API,provier,consumer

    •   DemoAPI提供服务的通用接口,创建为普通Maven项目,接口打包到中心仓库供其它工程使用,POM文件如下:
      <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
          <modelVersion>4.0.0</modelVersion>
      
          <groupId>spcloud-dubbo</groupId>
          <artifactId>demo-api</artifactId>
          <version>1.0</version>
          <!-- 发布到仓库 -->
          <distributionManagement>
              <repository>
                  <id>nexus-releases</id>
                  <name>Nexus Release Repository</name>
                  <url>http://nexusserver:6060/nexus/content/repositories/releases/</url>
              </repository>
              <snapshotRepository>
                  <id>nexus-snapshots</id>
                  <name>Nexus Snapshot Repository</name>
                  <url>http://nexusserver:6060/nexus/content/repositories/snapshots/</url>
              </snapshotRepository>
          </distributionManagement>
      
      </project>
      View Code

相关文章:

  • 2022-12-23
  • 2021-07-15
  • 2021-04-06
  • 2021-06-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2021-09-20
  • 2021-04-26
相关资源
相似解决方案