January 2018
Intermediate to advanced
414 pages
10h 29m
English
If we explore the existing MBeans in our microservice, there are plenty of them, but it may be possible to create our own to provide either information or tools for managing our microservice.
We will create a new class and name it GreetingsMBean:
package com.microservices.chapter10import org.springframework.beans.factory.annotation.Autowiredimport org.springframework.jmx.export.annotation.ManagedOperationimport org.springframework.jmx.export.annotation.ManagedOperationParameterimport org.springframework.jmx.export.annotation.ManagedOperationParametersimport org.springframework.jmx.export.annotation.ManagedResourceimport org.springframework.stereotype.Component@Component@ManagedResource(objectName = "com.microservices:type=greetings,name=GetHello" ...
Read now
Unlock full access