config.server

简介: <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.

    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.9.RELEASE</version>
    <relativePath /> <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-config-server</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-bus-amqp</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-eureka</artifactId>
    </dependency>
    <dependency>
        <groupId>org.eclipse.jgit</groupId>
        <artifactId>org.eclipse.jgit</artifactId>
        <version>4.8.0.201706111038-r</version>
    </dependency>
</dependencies>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Edgware.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

<repositories>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>maven-repository</id>
        <url>http://repo1.maven.org/maven2/</url>
    </repository>
</repositories>

application.yml
spring:
application:

name: config-server

cloud:

config:
  server:
    git:
      uri: https://github.com/michaelhhl/configtest/
bus: 
  trace: 
    enabled: true

rabbitmq:

host: localhost
port: 5672
username: mqadmin
password: 123456

server:
port: 6201

eureka:
client:

serviceUrl:
  defaultZone: http://192.168.106.1:8762/eureka/   #10.67.31.148
 

management:
security:

 enabled: false

@EnableDiscoveryClient
@SpringBootApplication
@EnableConfigServer
public class ConfigServer {


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

}

本文参考:
https://www.cnblogs.com/ityouknow/p/6931958.html

目录
相关文章
Web server failed to start. Port XXX was already in use.【完美解决方案】
Web server failed to start. Port XXX was already in use.【完美解决方案】
Web server failed to start. Port XXX was already in use.【完美解决方案】
|
7月前
|
Java 应用服务中间件 nginx
Server
Server
28 0
|
NoSQL 关系型数据库 Shell
|
网络协议 区块链
p2p_server
以太坊系列之十九 对p2p模块server的理解 type transport interface { // The two handshakes. doEncHandshake(prv *ecdsa.
960 0
|
网络协议 Shell 数据安全/隐私保护