[系统]
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/