SpringCloudConfig和SpringCloudBus_server

pom:

注意springboot的版本为2.0


  4.0.0
  com.itmayiedu
  config-newserver
  0.0.1-SNAPSHOT
  
		org.springframework.boot
		spring-boot-starter-parent
		2.0.1.RELEASE
	

	
		UTF-8
		UTF-8
		1.8
	

	
		
			org.springframework.cloud
			spring-cloud-config-server
		
		 
        
            org.springframework.cloud
            spring-cloud-bus
        
        
            org.springframework.cloud
            spring-cloud-stream-binder-rabbit
        	
	

    
        
            
                org.springframework.cloud
                spring-cloud-dependencies
                Finchley.M9
                pom
                import
            
        
    


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

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

Application:

@SpringBootApplication
@EnableConfigServer
public class ConfigServerApplication {
	public static void main(String[] args) {
		SpringApplication.run(ConfigServerApplication.class, args);
	}
}

application.yml:

spring:
  application:
    name: config-server 
  rabbitmq:
    host: 192.168.202.129
  cloud:
    config:
      server:
        git:
          uri: https://gitee.com/javaschen/cloud-logistics-config.git
server:
  port: 12000
management: #暴露触发消息总线的地址
  endpoints:
    web:
      exposure:
        include: bus-refresh

cloud-logistics-config.git创建

SpringCloudConfig和SpringCloudBus_server_第1张图片

SpringCloudConfig和SpringCloudBus_server_第2张图片

 

server:
    port: 8881
spring:
    application:
        name: config-client
    rabbitmq:
        host: 192.168.202.129
userName: 88888

 

你可能感兴趣的:(SpringCloudConfig和SpringCloudBus_server)