SpringCloud -创建统一的依赖管理

场景

Spring Cloud 为开发者提供了在分布式系统(配置管理,服务发现,熔断,路由,微代理,控制总线,一次性 Token,全居琐,Leader 选举,分布式 Session,集群状态)中快速构建的工具,使用 Spring Cloud 的开发者可以快速的启动服务或构建应用、同时能够快速和云平台资源进行对接。

注:

博客:
https://blog.csdn.net/badao_liumang_qizhi
关注公众号
霸道的程序猿
获取编程相关电子书、教程推送与免费下载。

实现

在目录下新建一个目录hello-spring-cloud ,然后使用IDEA打开这个目录。

SpringCloud -创建统一的依赖管理_第1张图片

这个文件夹是用来放所有工程的,所以在IDEA上右击目录继续新建目录。

SpringCloud -创建统一的依赖管理_第2张图片

为统一的依赖管理项目取名字。

SpringCloud -创建统一的依赖管理_第3张图片

新建完成后再新建File--pom.xml

SpringCloud -创建统一的依赖管理_第4张图片

 

 

复制如下代码:


         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    4.0.0

   
        org.springframework.boot
        spring-boot-starter-parent
        2.0.3.RELEASE
   

    com.badao
    hello-spring-cloud-dependencies
    1.0.0-SNAPSHOT
    pom

    hello-spring-cloud-dependencies
    https://blog.csdn.net/badao_liumang_qizhi
    2019-Now

   
       
        1.8
        UTF-8
        UTF-8

       
        Finchley.RC1
   

   
       
           
                org.springframework.cloud
                spring-cloud-dependencies
                ${spring-cloud.version}
                pom
                import
           

       

   

   
       
           
           
                org.apache.maven.plugins
                maven-compiler-plugin
               
                    true
               

           

           
           
                org.apache.maven.plugins
                maven-jar-plugin
               
                   
                        false
                   

               

               
                   
                       
                           
                               
                                   
                                    true
                                    true
                                    true
                               

                           

                       

                   

               

           

           
           
                org.apache.maven.plugins
                maven-resources-plugin
           

           
           
                org.apache.maven.plugins
                maven-install-plugin
           

           
           
                org.apache.maven.plugins
                maven-clean-plugin
           

           
           
                org.apache.maven.plugins
                maven-antrun-plugin
           

           
           
                org.apache.maven.plugins
                maven-dependency-plugin
           

       

       
           
               
               
                    org.apache.maven.plugins
                    maven-javadoc-plugin
                   
                       
                            prepare-package
                           
                                jar
                           

                       

                   

               

               
               
                    net.alchim31.maven
                    yuicompressor-maven-plugin
                    1.5.1
                   
                       
                            prepare-package
                           
                                compress
                           

                       

                   

                   
                        UTF-8
                        false
                        true
                        30000
                        true
                       
                            **/*.js
                            **/*.css
                       

                       
                            **/*.min.js
                            **/*.min.css
                       

                   

               

           
       

       
       
           
                src/main/java
               
                    **/*.java
               

           

           
                src/main/resources
           

       

   

   
       
            aliyun-repos
            Aliyun Repository
            http://maven.aliyun.com/nexus/content/groups/public
           
                true
           

           
                false
           

       

       
            sonatype-repos
            Sonatype Repository
            https://oss.sonatype.org/content/groups/public
           
                true
           

           
                false
           

       

       
            sonatype-repos-s
            Sonatype Repository
            https://oss.sonatype.org/content/repositories/snapshots
           
                false
           

           
                true
           

       

       
            spring-snapshots
            Spring Snapshots
            https://repo.spring.io/snapshot
           
                true
           

       

       
            spring-milestones
            Spring Milestones
            https://repo.spring.io/milestone
           
                false
           

       

   

   
       
            aliyun-repos
            Aliyun Repository
            http://maven.aliyun.com/nexus/content/groups/public
           
                true
           

           
                false
           

       

   

 

然后将pom.xml添加到托管

SpringCloud -创建统一的依赖管理_第5张图片

 

 

你可能感兴趣的:(SpringCloud -创建统一的依赖管理)