spring - 如何解决错误: Spring 退出值非零为1?

标签 spring spring-boot gradle

[系统]
Spring 启动:2.1.7版本
Gradle :4.10.2
我通常知道上面的错误在端口号被另一个程序使用时出现,但是当我更改端口时也会发生该错误。
如预期的那样,该错误是由Gradle依赖项中添加的Apache Poi引起的。
我想知道解决此问题的方法。
以下是我的Gradle代码。

buildscript {
    ext {
        springBootVersion = '2.1.7.RELEASE'
    }
    repositories {
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

group 'com.tistory.cafecoder'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    compile('org.springframework.boot:spring-boot-starter-web')
    compile('org.projectlombok:lombok')
    compile('org.springframework.boot:spring-boot-starter-data-jpa')
    compile('com.h2database:h2')
    compile('org.springframework.boot:spring-boot-starter-mustache')
    compile('org.springframework.boot:spring-boot-starter-oauth2-client:')
    compile('org.apache.poi:poi-ooxml:3.11')
    compile('org.apache.commons:commons-io:1.3.2')

    testCompile('org.springframework.boot:spring-boot-starter-test')
    testCompile('org.springframework.security:spring-security-test')
}

最佳答案

解决了。
POI本身不是问题。我不想解决服务类中的所有内容,因此我声明了一个外部类来解析xlsx文件。
我使用了@RequiredArgsConstructor。
在此过程中,我将一个简单的类声明为“个人决赛”时遇到了一个问题。
这仅仅是缺乏对Spring Boot注释的了解。...TT

关于spring - 如何解决错误: Spring 退出值非零为1?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63244148/

相关文章:

java - spring-boot 和 shedlock - 如何追踪依赖冲突?

java - 从 Spring 2.5.6 升级到 3.2.6 导致 Spring Transaction Management 不再适用于 JBoss 5.1.0 和 Hibernate 3.5.6

java - 如何使用 spring boot 压缩下载的文件

java - Spring 启动 : Configure a url prefix for RestControllers

spring-boot - 使用多个配置文件配置 logback

java - Gradle War 插件 - 重命名库

android - android库单元测试gradle文件

java - 空 EntityManager Spring 4

android - 具有 flavor 的ext变量不适用于多维

java - com.ibm.websphere#uow;6.0.2.17 : not found