Tag: angularjs

Angular:如何在表单提交中发布文件到服务器

我有一个表单被张贴到我的后端(Kotlin,Spring Web)。 这个表格有一些文字输入,而且这个post完美无瑕。 但是当我添加一个文件输入时,该post停止工作,返回以下错误: {status: 400, error: “Bad Request”,…} error: “Bad Request” exception: “org.springframework.http.converter.HttpMessageNotReadableException” message: “Could not read document: No suitable constructor found for type [simple type, class com.test.InsertConfigCommand]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?)↵ at [Source: java.io.PushbackInputStream@2cb43211; line: 1, column: 2]; nested […]

Angular:如何在表单提交中发布文件到服务器

我有一个表单被张贴到我的后端(Kotlin,Spring Web)。 这个表格有一些文字输入,而且这个帖子完美无瑕。 但是当我添加一个文件输入时,该帖子停止工作,返回以下错误: {status: 400, error: "Bad Request",…} error: "Bad Request" exception: "org.springframework.http.converter.HttpMessageNotReadableException" message: "Could not read document: No suitable constructor found for type [simple type, class com.test.InsertConfigCommand]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?)↵ at [Source: java.io.PushbackInputStream@2cb43211; line: 1, column: 2]; nested […]