You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/06 11:53:47 UTC

[GitHub] [dubbo] startjava commented on issue #8696: 如何在https://github.com/apache中找到dubbo+springboot的pom.xml配置标准代码啊?

startjava commented on issue #8696:
URL: https://github.com/apache/dubbo/issues/8696#issuecomment-913587831


   我现在的parent项目使用:
   ```
       <dependencyManagement>
           <dependencies>
               <!-- Spring Boot -->
               <dependency>
                   <groupId>org.springframework.boot</groupId>
                   <artifactId>spring-boot-dependencies</artifactId>
                   <version>${spring-boot.version}</version>
                   <type>pom</type>
                   <scope>import</scope>
               </dependency>
   
               <!-- Apache Dubbo  -->
               <dependency>
                   <groupId>org.apache.dubbo</groupId>
                   <artifactId>dubbo-dependencies-bom</artifactId>
                   <version>${dubbo.version}</version>
                   <type>pom</type>
                   <scope>import</scope>
               </dependency>
   
           </dependencies>
       </dependencyManagement>
   
       <dependencies>
           <dependency>
               <groupId>junit</groupId>
               <artifactId>junit</artifactId>
               <version>4.11</version>
               <scope>test</scope>
           </dependency>
   
           <!-- Dubbo Spring Boot Starter -->
           <dependency>
               <groupId>org.apache.dubbo</groupId>
               <artifactId>dubbo-spring-boot-starter</artifactId>
               <version>${dubbo.version}</version>
           </dependency>
       </dependencies>
   ```
   
   子模块使用:
   ```
       <parent>
           <artifactId>my-parent</artifactId>
           <groupId>com.ghy.www</groupId>
           <version>1.0-RELEASE</version>
           <relativePath>../my-parent/pom.xml</relativePath>
       </parent>
   
       <dependencies>
           <!-- Spring Boot dependencies -->
           <dependency>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-starter</artifactId>
           </dependency>
   
           <dependency>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-starter-web</artifactId>
           </dependency>
   
           <dependency>
               <groupId>org.apache.dubbo</groupId>
               <artifactId>dubbo-spring-boot-starter</artifactId>
               <version>${dubbo.version}</version>
           </dependency>
   
           <!-- Zookeeper dependencies -->
           <dependency>
               <groupId>org.apache.dubbo</groupId>
               <artifactId>dubbo-dependencies-zookeeper</artifactId>
               <version>${dubbo.version}</version>
               <type>pom</type>
           </dependency>
   
           <dependency>
               <groupId>com.ghy.www</groupId>
               <artifactId>my-api</artifactId>
               <version>1.0-RELEASE</version>
               <scope>compile</scope>
           </dependency>
       </dependencies>
   ```
   
   我这种写法不知道是不是最佳实践。有什么需要改进的地方。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org