由于依赖关系,Google Api日历和Spring Boot无法正常工作

时间:2018-07-27 15:04:04

标签: spring-boot google-api google-calendar-api

我正在尝试使用Google Api for Calendar(https://developers.google.com/calendar/quickstart/java),但是,当我在Spring Boot项目中包含依赖项时,会出现错误。

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Tomcat]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.28.jar:8.5.28]
    ... 15 common frames omitted

它似乎与Google api使用Jetty有关。 这些是我的build.gradle依赖项:

dependencies {
    compile "com.google.api-client:google-api-client:1.23.0"
    compile 'com.google.oauth-client:google-oauth-client-jetty:1.23.0'
    compile 'com.google.apis:google-api-services-calendar:v3-rev305-1.23.0'

    compile 'javax.persistence:javax.persistence-api:2.2'
    compile 'javax.inject:javax.inject:1'
    compile 'javax.validation:validation-api:2.0.1.Final'

    compile 'org.springframework.boot:spring-boot-starter-web'
    compile 'org.springframework.boot:spring-boot-starter-data-jpa'
    compile 'com.h2database:h2'

    compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'

    gradleLint.ignore('unused-dependency') {
        compileOnly 'org.projectlombok:lombok:1.16.20'
    }
}

0 个答案:

没有答案