小编Zub*_*med的帖子

找不到 org.springframework.boot:spring-boot-starter-log4j

我正在尝试将 apache log4j 集成到我的 Spring Boot 应用程序中。这是我的 build.gradle 文件:

构建.gradle

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.3.RELEASE")
        classpath 'mysql:mysql-connector-java:5.1.34'
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'

jar {
    baseName = 'spring-boot-sample'
    version =  '0.1.0'
}

repositories {
    mavenCentral()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    // tag::jetty[]
    compile("org.springframework.boot:spring-boot-starter-web") {
        exclude module: 'spring-boot-starter-tomcat'
        exclude module: 'spring-boot-starter-logging'
    }
    compile("org.springframework.boot:spring-boot-starter-jetty")
    // end::jetty[]
    // tag::actuator[]
    compile("org.springframework.boot:spring-boot-starter-actuator")
    // end::actuator[]
    compile("org.springframework.boot:spring-boot-starter-log4j")
    compile("org.springframework.boot:spring-boot-starter-data-jpa")
    compile("mysql:mysql-connector-java:5.1.34")

    testCompile("junit:junit")

    testCompile("org.springframework.boot:spring-boot-starter-test") …
Run Code Online (Sandbox Code Playgroud)

log4j spring-boot

3
推荐指数
1
解决办法
6270
查看次数

标签 统计

log4j ×1

spring-boot ×1