【发布时间】:2021-01-16 00:10:00
【问题描述】:
我正在尝试使用 Kotlin 语言运行我的 SpringBoot maven 项目
mvnw spring-boot:run
,但我得到以下错误:
这是我在第 [14,62] 行的代码
import org.apache.tomcat.util.http.fileupload.FileUploadBase.FileSizeLimitExceededException
在 [44,xx] 行
@ExceptionHandler(value = [(FileSizeLimitExceededException::class)]) ==>this is line 44
@Throws(MultipartException::class)
fun handleFileSizeLimitExceededException(e: MultipartException, response: HttpServletResponse) {
response.sendError(HttpStatus.PAYLOAD_TOO_LARGE.value(), "The file exceeds its maximum permitted size.")
}
我试图找到解决方案,但没有找到任何东西,
我错过了什么吗?我很乐意提供任何帮助。
【问题讨论】:
标签: java spring-boot maven kotlin