SpringBoot整合dubbo

首先创建一个多模块Maven项目,再创建一个生产者子项目和一个消费者子项目。
父模块Maven POM文件如下:




  4.0.0

  org.nc.school
  school_manage
  1.0-SNAPSHOT
  school_manage
  学校管理系统
  
    school_manage-server
    school_manage-web
  
  pom



  
    4.12
    3.4.12
    1.0.0
    2.0.3.RELEASE
  

  
    
      junit
      junit
      ${junit.version}
      test
    


  

  
    ${project.artifactId}
      
        
          org.springframework.boot
          spring-boot-maven-plugin
        
      
  


生产者POM文件如下:




    
        school_manage
        org.nc.school
        1.0-SNAPSHOT
        school_manage/pom.xml
    
    4.0.0

    school_manage-server
    jar
    school_manage-server
    学校管理系统服务提供者

    
        
            org.springframework.boot
            spring-boot-starter-web
            ${spring-booot.version}
        

        
            io.dubbo.springboot
            spring-boot-starter-dubbo
            ${spring-boot-starter-dubbo.version}
        

        
            org.apache.zookeeper
            zookeeper
            ${zookeeper.version}
            
                
                    org.slf4j
                    slf4j-log4j12
                
            
        
    

    
        
            
                org.springframework.boot
                spring-boot-maven-plugin
                2.0.3.RELEASE
                
                    org.nc.school.Startup 
                    JAR 
                
            
        
    


消费者POM文件如下:




    
        school_manage
        org.nc.school
        1.0-SNAPSHOT
        school_manage/pom.xml
    
    4.0.0

    school_manage-web
    war

    school_manage-web
    学校管理系统消费者

    
        
            org.springframework.boot
            spring-boot-starter-web
            2.0.3.RELEASE
        
        
            io.dubbo.springboot
            spring-boot-starter-dubbo
            1.0.0
        
        
            org.apache.zookeeper
            zookeeper
            ${zookeeper.version}
            
                
                    org.slf4j
                    slf4j-log4j12
                
            
        
        
            org.nc.school
            school_manage-server
            1.0-SNAPSHOT
        
    

    
        
            
                
                    org.springframework.boot
                    spring-boot-maven-plugin
                
            
        
    


你可能感兴趣的:(SpringBoot整合dubbo)