springboot admin 配置

springboot admin 配置Configuratio EnableAutoCo EnableAdminS nbsp 1 使用 idea 新建一个 springboot 工程 并修改 pom xml 添加 admin 依赖 nbsp nbsp lt dependency gt lt groupId gt de codecentric lt groupId amp

@Configuration @EnableAutoConfiguration @EnableAdminServer

 1.使用idea新建一个springboot工程,并修改pom.xml,添加admin依赖

 

 

 
   
   
     de.codecentric 
    
   
     spring-boot-admin-server 
    
   
     1.5.6 
    
   
   
   
     de.codecentric 
    
   
     spring-boot-admin-server-ui 
    
   
     1.5.6 
    
   
   
   
     de.codecentric 
    
   
     spring-boot-admin-starter-client 
    
   
     1.5.6 
    
  

 

 

 注意点:springboot的高版本可能会不支持,所以可以采用稳定的版本

 

 2.修改springboot启动配置文件 application.properties/ application.yml 文件,添加配置(其中端口,可以自行

 配置)

 

  

server.port=8081 management.security.enabled=false spring.boot.admin.url=http://localhost:8081/

 

 

3.在启动类添加启动admin注解

@Configuration @EnableAutoConfiguration @EnableAdminServer

 

 4.启动功能,显示如下,则说明成功,然后拷贝图下的地址,输入浏览器中,则可以显示admin配置信息

  浏览器输入,springboot-admin 显示结果:

 

 

 

源码地址:https://gitee.com/chui0704/springboot.git

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/218106.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月18日 上午8:01
下一篇 2026年3月18日 上午8:02


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号