EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 600+ Courses All in One Bundle
  • Login
Home Software Development Software Development Tutorials Spring Tutorial Spring Boot Admin
Secondary Sidebar
Spring Tutorial
  • Spring Boot
    • What is Spring Boot
    • Spring Boot flyway
    • Spring Boot framework
    • Spring Boot Logback
    • Spring Boot actuator endpoints
    • Spring Boot gRPC
    • Spring Boot jdbctemplate example
    • Spring Boot ehcache
    • Spring Boot Architecture
    • Spring Boot Port
    • Introduction of spring boot
    • Spring Boot ide
    • Spring Boot Netty
    • Spring Boot ORM
    • Spring Boot Versions
    • Spring Boot JUnit
    • Spring Boot Keycloak
    • Spring Boot gradle
    • Spring Boot Lombok
    • Spring Boot autowired
    • Spring Boot bean
    • Spring Boot hibernate
    • Spring Boot integration test
    • Spring Boot jdbc
    • Spring Boot MongoDB
    • Spring Boot postgresql
    • Spring Boot rest
    • Spring Boot swagger
    • Spring Boot thymeleaf
    • Spring Boot Unit Test
    • Spring Boot Webflux
    • Spring Boot webclient
    • Spring Boot kubernetes
    • Spring Boot Properties
    • Spring Boot Validation
    • Spring Boot Feature
    • Spring Boot Application
    • Spring Boot email
    • Spring Boot MVC
    • Spring Boot Exception Handling
    • Spring Boot Starter Parent
    • Spring Boot Docker
    • Spring Boot Logging
    • Spring Boot Query
    • Spring Boot Multiple Data Sources
    • Spring Boot Basic Authentication
    • Spring Boot Test
    • Spring Boot jwt
    • Spring Boot Liquibase
    • Spring Boot Prometheus
    • Spring Boot debug
    • Spring Boot GraalVM
    • Spring Boot Batch
    • Spring Boot controller
    • Spring Boot CLI
    • Spring Boot file upload
    • Spring Boot interceptor
    • Spring Boot Service
    • Spring Boot Configuration
    • Spring Boot Datasource Configuration
    • Spring Boot Annotations
    • Spring Boot Starter We
    • Spring Boot Actuator
    • Spring Boot DevTools
    • Spring Boot Repository
    • Spring Boot Dependencies
    • Spring Boot Path Variable
    • Spring Boot Microservices
    • Spring Boot Run Command
    • Spring Boot application.properties
    • Spring Boot Transaction Management
    • Spring Boot Banner
    • Spring Boot JPA
    • Spring Boot Change Port
    • Spring Boot RestTemplate
    • Spring Boot cors
    • Spring Boot HTTPS
    • Spring Boot OAuth2
    • Spring Boot Profiles
    • Spring Boot Interview Questions
    • Spring Boot filter
    • Spring boot logging level
    • Spring Boot Cache
    • Spring Boot Advantages
    • Spring Boot Scheduler
    • Spring Boot Initializr
    • Spring Boot Maven
    • Spring Boot Admin
    • Spring Boot Tomcat
    • Spring Boot WebSocket
    • Spring Boot Executable Jar
    • Spring Boot CommandLineRunner
    • Spring Boot DataSource
    • Spring Batch Scheduler
    • Spring Batch Example
    • Spring Batch Tasklet
    • Spring Batch Admin
    • Spring Batch
    • Spring Boot Qualifier
    • Spring Boot War
    • Spring Boot Test Configuration
  • Spring
    • What is Spring Framework?
    • Spring Architecture
    • What is Spring Integration?
    • IoC Containers
    • What is AOP?
    • Spring Modules
    • Spring Batch Processing
    • Spring Batch Partitioner
    • Spring Batch Job
    • Spring AOP
    • Spring Expression Language
    • Dependency Injection in Spring
    • Spring Batch Architecture
    • Spring framework Interview Questions
  • Spring Cloud Basics
    • What is Spring Cloud
    • Spring Cloud Contract
    • Spring Cloud Components
    • Spring Cloud Version
    • Spring Cloud Data Flow
    • Spring cloud stream
    • Spring Cloud Dependencies
    • Spring cloud microservices
    • spring cloud gateway
    • Spring Cloud Config
    • Spring Cloud Kubernetes
    • Spring Cloud Sleuth

Spring Boot Admin

Spring Boot Admin

Introduction to Spring Boot Admin

Spring boot admin is the web application that was used to manage and monitor the web application, each client in will consider as a client and it will register at the admin server. Basically, it is the community project used to manage the application of spring boot, those all application is registered with spring boot client of admin and discovered with the spring cloud. To create a project first, we need to set up our server. Spring boot admin server is able to run the web flux or servlet application.

What is Spring Boot Admin?

  • As we know it is a community project which was used to manage the web-based and spring boot application.
  • We can register our client with the admin server. To register the client, each client needs the spring jars actuator.
  • The endpoint which was provided by the actuator jar is pulled by using the admin server of spring boot.
  • The actuator monitor is interacting with our application. Spring boot is including the number of endpoints and also we can add our own endpoints.
  • Monitoring of our application by using an actuator endpoint is difficult. Because we have an N number of applications. Every application contains the separate endpoints of the actuator, so it will make the monitoring a little bit difficult.
  • We can monitor the microservice application.
  • To manage and monitor the application by using the server we need to add the starter dependency and need to point the URI in properties of an application file.
  • To monitor the application, we need to add the actuator of spring boot endpoints of our microservice application.
  • Spring boot actuator is helping to manage and monitor the spring boot services of individual applications.
  • It is a simple spring boot project. The endpoint of spring boot is providing lots of insights regarding the application.
  • If we are running many applications, then monitor of each application by hitting each endpoint is very tedious. To avoid this problem, we are using a server in our application.
  • To create a server module, we need to add maven dependency in our application.
  • To develop an application, we need to set up the server first after creating the server we are adding a client to the admin server.
  • After adding maven dependency and creating admin server and client we need to do a security configuration.
  • We can also set the notification which was received from the server. Following are the notifier available at the time of developing the application.

1) Let’s chat
2) OpsGenie
3) Email
4) Pager duty
5) Slack
6) Discord
7) Telegram
8) Microsoft teams
9) HipChat

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

  • To use email notification in the application we need to add mail starter dependency in pom.xml file.
  • Using this notification, after going our client offline the mail is sent to the registered mail address which was configured in the configuration file.

Admin Server Setup

  • Below is the step to create an admin server setup.

1) Create a new project template using a spring initializer and give the following name to the project metadata.

Group – com. example
Artifact name – springbootadmin
Name – springbootadmin
Description – Project of spring boot admin.
Package name – com. example.springbootadmin
Packaging – Jar
Java – 11

Dependencies – concentric spring boot admin client and concentric spring boot admin server.

1

2) After generating the project extract files and open this project by using the spring tool suite

  • In this step, we have to extract the zip file and opening the project in the spring tool suite.

2

3) After opening project using spring tool suite check the project and its files –

  • After opening the project, we have to check all the project files. We need to check the java main and pom.xml files.

3

4) Add admin server dependency –

  • After opening the project next step is to add the admin server dependency in pom.xml file.

Code –

<dependency> -- Start of dependency tag.
<groupId>de.codecentric</groupId> -- Start and end of groupId tag.
<artifactId>spring-boot-admin-starter-server</artifactId> -- Start and end of groupId tag.
</dependency> -- End of dependency tag.

4

5) After adding the server dependency enable admin server annotation

In this step, we have to enable the annotation of the admin server.

Code:

@EnableAdminServer -- Annotation of admin server.
@SpringBootApplication -- Annotation of spring boot application.
public class SpringbootAdmin {
public static void main /*project main method */ (String[] args) {
SpringApplication.run (SpringbootAdmin.class, args);
}
}

5

6) Run the spring boot admin app

image

7) After running the app open the browser and run the application using default port no.

http://localhost:8080

image 1

8) Add admin server-client dependency –

  • After opening the project next step is to add the admin server-client dependency in pom.xml file.

Code:

<dependency> -- Start of dependency tag.
<groupId>de.codecentric</groupId> -- Start and end of groupId tag.
<artifactId> spring-boot-admin-starter-client</artifactId> -- Start and end of groupId tag.
</dependency> -- End of dependency tag.

Spring Boot Admin image 2

9) After adding admin server-client dependency next step is to create the actuator endpoint. At the time of creating the actuator endpoint, we have to provide the URL of the admin server.

Code:

management:
endpoints:
web:
exposure:
include: '*'
endpoint:
health:
show-details: always
spring:
boot:
admin:
client:
url: http://localhost:8080
application:
name: music Service

Spring Boot Admin image 3

10) After creating the actuator endpoint run the spring boot admin project in the spring tool suite.

  • In this step, we are running our project in the spring tool suite are as follows.

Spring Boot Admin image 4

11) After running spring boot admin app open the browser and run the application using default port no.

http://localhost:8080

Spring Boot Admin image 5

Recommended Articles

This is a guide to Spring Boot Admin. Here we discuss the definition, What is Spring Boot Admin? examples with code implementation. You may also have a look at the following articles to learn more –

  1. Spring Boot Exception Handling
  2. Spring Boot Logging
  3. Spring Boot Batch
  4. Spring Boot cors
Popular Course in this category
Spring Boot Training Program (2 Courses, 3 Project)
  2 Online Courses |  3 Hands-on Projects |  22+ Hours |  Verifiable Certificate of Completion
4.5
Price

View Course

Related Courses

Spring Framework Training (4 Courses, 6 Projects)4.9
All in One Data Science Bundle (360+ Courses, 50+ projects)4.8
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Java Tutorials
  • Python Tutorials
  • All Tutorials
Certification Courses
  • All Courses
  • Software Development Course - All in One Bundle
  • Become a Python Developer
  • Java Course
  • Become a Selenium Automation Tester
  • Become an IoT Developer
  • ASP.NET Course
  • VB.NET Course
  • PHP Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more