我遵循了本指南https://superuser.com/a/860604
但是,当我运行 mysql 时,它会下降并出现错误:
2017-12-15 12:24:58 10592 [错误] 表 mysql.column_stats 的定义不正确:位置 3 处的预期列“min_value”的类型为 varbinary(255),发现类型为 varchar(255)。
2017-12-15 12:24:58 10592 [错误] 表 mysql.column_stats 的定义不正确:位置 4 的预期列“max_value”的类型为 varbinary(255),发现类型为 varchar(255)。
怎么了?
Spring 5.0.7:MVC、数据、安全。我配置multipartResolver。
我发送下一个 Ajax 请求:
$.ajax({
type: 'POST',
cache: false,
processData: false,
contentType: false,
url: '/api/v1/category/add',
data: new FormData(form)
}).done(result=>{console.log(result);}).fail(result=>{
console.error('ERROR:', result.responseJSON.httpStatus, result.responseJSON.message, result);
self.toast.error('API Error.');
});
Run Code Online (Sandbox Code Playgroud)
但是有一个错误: Content type 'multipart/form-data;boundary=----WebKitFormBoundary6xBCDjCtYYuUVR5c' not supported
为什么?我不明白为什么会发生错误。
控制器:
@RestController
@Secured("hasRole('ADMIN')")
@RequestMapping(value = "/api/v1")
public class ApiController {
private static final Logger LOGGER = LogManager.getLogger(ApiController.class);
@PostMapping(value = "/category/add", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
private Response categoryAdd(Response response, @RequestBody CategoryAddForm categoryAddForm) {
LOGGER.info(categoryAddForm.toString());
return response;
}
}
Run Code Online (Sandbox Code Playgroud)
类别添加表格:
public class CategoryAddForm { …Run Code Online (Sandbox Code Playgroud) 我做的项目ReactJS.把reactstrap模块放在元素中bootstrap4.
我有reactstrap标签:
import React, {Component} from 'react';
import {
Button,
Col,
Container,
Form,
Input,
InputGroup, InputGroupAddon, InputGroupText,
Label,
Nav,
NavItem,
NavLink,
Row,
TabContent,
TabPane
} from "reactstrap";
import {Link} from "react-router-dom";
import classNames from 'classnames';
import Logo from "../../components/common/Logo";
import '../../style/page/auth/style.css';
import '../../style/page/auth/media.css';
import '../../style/page/auth/custom.css';
class LoginPage extends Component {
constructor(props) {
super(props);
this.state = {
activeTab: 'signInTab'
};
this.toggle = this.toggle.bind(this);
this.openTermsTab = this.openTermsTab.bind(this);
}
componentDidMount() {
document.title = "???????????";
} …Run Code Online (Sandbox Code Playgroud)