十三、springboot Admin

1、创建server端spring-boot-admin

2、添加依赖

<parent>

  <groupId>org.springframework.boot</groupId>

  <artifactId>spring-boot-starter-parent</artifactId>

  <version>2.0.5.RELEASE</version>

  <relativePath /> <!-- lookup parent from repository -->

</parent>

<dependencies>

  <dependency>

    <groupId>de.codecentric</groupId>

    <artifactId>spring-boot-admin-starter-server</artifactId>

    <version>2.0.0</version>

  </dependency>

  <dependency>

    <groupId>org.springframework.boot</groupId>

    <artifactId>spring-boot-starter-web</artifactId>

    </dependency>

</dependencies>

3、设置启动端口

  server.port=8088

4、创建启动类

@Configuration

@EnableAutoConfiguration

@EnableAdminServer

public class AdminServerApplication {

 

public static void main(String[] args) {

SpringApplication.run(AdminServerApplication.class, args);

}

}

5、创建客户端spring-boot

6、添加依赖

<dependency>

<groupId>de.codecentric</groupId>

<artifactId>spring-boot-admin-starter-client</artifactId>

<version>2.0.0</version>

</dependency>

7、修改application.properties

#关掉安全认证

management.security.enabled=false

spring.boot.admin.client.url:http://localhost:8088

8、localhost:8088启动服务端

猜你喜欢

转载自www.cnblogs.com/monkeybrother/p/9780171.html