In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to monitor the process of springboot projects based on javamelody. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1. Related links
Official document https://github.com/javamelody/javamelody/wiki/UserGuide
Download address https://github.com/javamelody/javamelody/releases
two。 Basic integration
Add to 1.pom
Net.bull.javamelody javamelody-core 1.79.0
Add to the 2.springboot startup file
Public class App {public static void main (String [] args) {SpringApplication.run (App.class, args);} / * configure javamelody monitoring spring boot to filter * / @ Bean @ Order (Integer.MAX_VALUE-1) public FilterRegistrationBean monitoringFilter () {FilterRegistrationBean registration = new FilterRegistrationBean (); registration.setFilter (new MonitoringFilter ()); registration.addUrlPatterns ("/ *"); registration.setName ("monitoring"); return registration according to the order value. } / * configure the javamelody listener sessionListener * / @ Bean public ServletListenerRegistrationBean servletListenerRegistrationBean () {ServletListenerRegistrationBean slrBean = new ServletListenerRegistrationBean (); slrBean.setListener (new SessionListener ()); return slrBean;}}
3, you can now deploy the program to start the server and open http:////monitoring in the browser. : for your host name + port address,: configure the address for your application. You should see the following interface:
3. Spring method-level monitoring
The premise is to use the monitoring-spring.xml file (without modification), and then use the @ MonitoredWithSpring annotation on the methods that need to be monitored.
Thank you for reading! This is the end of this article on "how to monitor the springboot project process based on javamelody". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.