• 當前位置:首頁 > IT技術 > 移動平臺 > 正文

    開發中遇到的問題---【ERROR in ch.qos.logback.core.joran.spi.Interpreter@49:40 - no applicable act】
    2022-08-30 00:00:22

    問題:本地可以正常啟動,但是在測試環境,把application.yml放到bin目錄下,用腳本啟動就會啟動不了,報錯:“ERROR in ch.qos.logback.core.joran.spi.Interpreter@49:40 - no applicable act”;

    分析:我項目要求用log4j2,日志引入和自帶的logback沖突導致,導致啟動的時候,無法確定按誰的規則去讀配置文件了。

    方案:在pom.xml文件中引入下面的依賴;

    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter</artifactId>
    <exclusions>
    <exclusion>
    <artifactId>logback-core</artifactId>
    <groupId>ch.qos.logback</groupId>
    </exclusion>
    <exclusion>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-logging</artifactId>
    </exclusion>
    </exclusions>
    </dependency>

    ?

    本文摘自 :https://blog.51cto.com/u

    開通會員,享受整站包年服務
    国产呦精品一区二区三区网站|久久www免费人咸|精品无码人妻一区二区|久99久热只有精品国产15|中文字幕亚洲无线码