我们如何将更高版本的 Log4j 设置为 grails 应用程序

编程入门 行业动态 更新时间:2024-10-24 21:36:34
本文介绍了我们如何将更高版本的 Log4j 设置为 grails 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 grails 应用程序中有我的 log4j 设置,版本为 2.4.3.我在 lib 文件夹中的 log4j 版本是 1.2.17(grails 2.4.3 的兼容版本).由于 log4j 漏洞利用问题,我需要将 log4j 版本升级到 2.16.0.如何进行必要的配置以将我现有的 grails 应用程序指向最新的 log4j?

I have my log4j settings in my grails app with version 2.4.3. And my log4j version inside the lib folder is 1.2.17 (the compatible version of grails 2.4.3). Due to the log4j exploit issue, I need to upgrade my log4j version to 2.16.0. How can I do the necessary configurations to point my existing grails app to the latest log4j?

推荐答案

在BuildConfig.groovy文件中,通过以下几行,可以升级log4j的版本,进入依赖"部分:

In BuildConfig.groovy file, with some that following lines, you can upgrade version of log4j, into "dependences" section:

compile 'org.apache.logging.log4j:log4j-core:2.16.0'

compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.16.0'

但是,当我添加依赖时,旧版本的log4j(1.2.17)并没有被删除,所以我不确定使用的是什么版本.

However, when I add dependence, the old version of log4j (1.2.17) is not deleted, so I´m not sure what version is using.

这篇关于我们如何将更高版本的 Log4j 设置为 grails 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-03-19 12:25:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/645306.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:更高   设置为   如何将   应用程序   版本

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!