spring cloud (七) Config server基于svn配置

2021-05-20 00:29

阅读:515

标签:type   span   bsp   test   parent   cloud   file   soft   def   

1 pom.xml


    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    4.0.0com.example
    Spring-Cloud-Config-Server
    0.0.1-SNAPSHOTjarSpring-Cloud-Config-ServerDemo project for Spring Bootorg.springframework.boot
        spring-boot-starter-parent
        2.0.5.RELEASEUTF-8UTF-81.8Finchley.SR1org.springframework.cloud
            spring-cloud-starter-netflix-eureka-server
        org.springframework.cloud
            spring-cloud-config-server
        

        org.springframework.boot
            spring-boot-starter-test
            testorg.tmatesoft.svnkit            
            svnkit            
            1.8.10


    org.springframework.cloud
                spring-cloud-dependencies
                ${spring-cloud.version}pomimportorg.springframework.boot
                spring-boot-maven-plugin
            

2 配置文件

server.port=7066
spring.application.name=config-server
eureka.client.service-url.defaultZone=http://localhost:8080/eureka/

spring.cloud.config.server.svn.uri=https://127.0.0.1:8443/svn/project/springcloudconfig/config/
spring.cloud.config.server.svn.username=root
spring.cloud.config.server.svn.password=123456
spring.cloud.config.server.default-label=config
spring.profiles.active=subversion

svn 目录

技术分享图片

 

 3 启动类

@SpringBootApplication
@EnableDiscoveryClient
@EnableConfigServer
public class SpringCloudConfigServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringCloudConfigServerApplication.class, args);
    }
}

 

4 启动服务

 

spring cloud (七) Config server基于svn配置

标签:type   span   bsp   test   parent   cloud   file   soft   def   

原文地址:https://www.cnblogs.com/syscn/p/9741122.html


评论


亲,登录后才可以留言!