springboot+gradle+log4j的配置

configurations {    
    compile.exclude module: 'spring-boot-starter-logging'//排除对默认logging的依赖
}

dependencies {    
    testCompile group: 'junit', name: 'junit', version: '4.12' 
    compile("org.springframework.boot:spring-boot-starter-web:1.4.0.RELEASE")  
    //添加对log4j starter的依赖。
    compile("org.springframework.boot:spring-boot-starter-log4j:1.3.7.RELEASE") 
}

或者

我用第二种时 'exclude'单词报"can't resolve symbol 'exclude' "结果不影响  添加依赖没得问题

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章