首页 > 编程语言 > 详细

十三、springboot Admin

时间:2018-10-12 20:25:46      阅读:193      评论:0      收藏:0      [点我收藏+]

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启动服务端

 

十三、springboot Admin

原文:https://www.cnblogs.com/monkeybrother/p/9780171.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!