春季靴子的新遗物 [英] New Relic for Spring Boot

查看:96
本文介绍了春季靴子的新遗物的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我们将tomcat/spring应用程序转换为spring boot.除了新的文物,一切都运转良好.有没有一种方法可以让我轻松地使用Spring Boot项目配置新的文物.我不想对新的遗物代理jar路径的位置进行硬编码,然后使用该路径运行spring boot项目.

Recently, we convert a tomcat/spring app to spring boot. Everything is working fine apart from new relic. Is there a way I can easily config new relic with spring boot project. I don't want to hard code the location of new relic agent jar path, then run the spring boot project with the path.

Spring启动项目与maven结合

edit: Spring boot project is with maven

推荐答案

您可以包括NewRelic Maven依赖项,并使用maven-dependency-plugin解压缩到您的target/classes目录中,这使Maven可以将其包含在最终的Jar文件中.然后,您必须将Premain-Class属性添加到清单文件中,然后才能将应用程序jar用作-javaagent源.您可以在我的博客文章

You can include NewRelic Maven dependency and use maven-dependency-plugin to unpack in into your target/classes directory, which allows Maven to include it into final Jar file. Then you have to add Premain-Class attribute into manifest file and you can use your application jar as -javaagent source. You can find details on my blog post

这篇关于春季靴子的新遗物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆