您好,登錄后才能下訂單哦!
1.? pom 加入依賴
????<!--?spring-boot-admin?監控中心?--> <dependency> ????<groupId>de.codecentric</groupId> ???? <artifactId>spring-boot-admin-starter-server</artifactId> ???? <version>${spring-boot-admin.version}</version> </dependency> <dependency> ????<groupId>de.codecentric</groupId> ????<artifactId>spring-boot-admin-server-ui</artifactId> ????<version>${spring-boot-admin-ui.version}</version> </dependency> <dependency> ????<groupId>org.jolokia</groupId> ????<artifactId>jolokia-core</artifactId> </dependency>
2.?application.properties 配置文件
#開啟安全認證?用戶名和密碼 spring.security.user.name=admin spring.security.user.password=root spring.security.basic.enabled=true #actuator配置 management.endpoints.web.exposure.include=* management.endpoints.web.exposure.exclude=env,beans management.security.enabled=false spring.boot.admin.routes.endpoints=env,metrics,trace,dump,jolokia,info,configprops,trace,logfile,refresh,flyway,liquibase,heapdump,activiti,hystrix.stream,turbine.stream
3. 啟動類?MainApplication.java
package?org.fh; import?org.springframework.boot.SpringApplication; import?org.springframework.boot.autoconfigure.SpringBootApplication; import?org.springframework.cloud.netflix.eureka.EnableEurekaClient; import?de.codecentric.boot.admin.server.config.EnableAdminServer; /** ?*?說明:啟動類? ?*?www.fhadmin.org ?*/ @SpringBootApplication @EnableEurekaClient @EnableAdminServer public?class?MainApplication?{ public?static?void?main(String[]?args)?{ SpringApplication.run(FHmainApplication.class,?args); } }
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。