当前位置: 首页 > 知识库问答 >
问题:

Springboot-我可以在SL4J中使用Jetty吗

寇甫
2023-03-14

我正在做一个Springboot-Kotlin-Gradle项目,我似乎遇到了记录器冲突。我正在使用一个包含slf4j的库--因此,在启动时,我得到了以下精彩消息

configurations {
    providedRuntime
    compile.exclude(group: 'ch.qos.logback')
}
dependencies {
    compile('org.springframework.boot:spring-boot-starter')
    compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
    compile("org.jetbrains.kotlin:kotlin-reflect")
    compile 'org.springframework.boot:spring-boot-starter-web'
    runtime('org.springframework.boot:spring-boot-devtools')
    testCompile('org.springframework.boot:spring-boot-starter-test')


    //SpringFox
    compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.8.0'
    compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.8.0'
    compile group: 'io.springfox', name: 'springfox-spring-web', version: '2.8.0'

    // SDDF
    compile "org.mitre.sddf:sddf:15.3.2"
}

我可以在applicaiton.ymlapplictaion.properties中添加一些内容吗?

共有1个答案

鲜于凯歌
2023-03-14

好吧,我似乎设法解决了我的问题(通过仔细阅读日志)

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/jstein/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-log4j12/1.7.25/110cefe2df103412849d72ef7a67e4e91e4266b4/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/jstein/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.3/7c4f3c474fb2c041d8028740440937705ebb473a/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

我将其添加到我的构建中。gradle

configurations.all {
 exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
 类似资料:
  • 我的应用程序使用Xfire作为web服务客户端,它是一个遗留系统,其中的服务是用Perl编写的,我正在用Spring boot修改/重写应用程序,当我添加Maven依赖时,当我尝试构建时它显示错误 我不知道数据库用在哪里了

  • 问题内容: 有什么方法可以将Socket.IO http://socket.io/与Django 一起使用? 问题答案: 你当然可以! Django本身并不异步,因此你必须与普通的django服务器并行使用Socket.IO服务器,node.js始终不是一个不错的选择,但也存在使用纯Python编写的其他服务器。

  • 我有一个实体,它有一个包含更多字段的可选子实体。子实体同样有一个元素集合。 这在Hibernate中通常是不可能的,还是我遗漏了什么? 错误消息为:

  • 我是springboot的新手,目前正在尝试调试spring boot应用程序。有什么办法可以做到吗?

  • 我想使用而不使用。我们有一个与Spring现有的项目,但我有麻烦配置没有。 当我使用@EnableZuulProxy注释时,出现以下错误: 原因:org。springframework。豆。工厂UnsatifiedPendencyException:创建名为“org”的bean时出错。springframework。云netflix。祖尔。ZuulProxyConfiguration”:通过字段“

  • 问题内容: 我在某处读过goole只允许提取的地方。这是否意味着不可能将org.apache.http.client.HttpClient集成到Google Appe引擎中? 如果没有,是否存在使用Google App Engine上的org.apache.http.client.HttpClient使用现有库的替代方法? 问题答案: 所以答案不是。您需要使用Google Fetch库。 从谷歌应