github文档
网页插件postman
Markdown editor插件
create table `user`(
`id` int auto_increment primary key ,
`name` varchar (100),
`token` char(36),
`account_id` varchar (100),
`gmt_create` bigint,
`gmt_modified` bigint,
`bio` varchar (256),
`head_img` varchar (100)
);
// 增加字段 不止通过github上登录 同样也可以自己注册登录
// 需要增加 邮箱 密码(密码通过加密的方式存储)
alter table `user` add `mail` varchar (256);
alter table `user` add `password_md5` varchar (256);
create table `question`(
`id` int primary key auto_increment,
`title` varchar(50),
`description` text,
`gmt_create` bigint comment "创建时间",
`gmt_modified` bigint comment "修改时间",
`creator` int comment "作者",
`comment_count` int default 0 ,
`view_count` int default 0,
`like_count` int default 0,
`tag` varchar(250) comment "标签"
);
create table `comment`(
`id` bigint primary key auto_increment,
`parent_id` bigint not null,
`type` int comment "父类类型",
`comment_user` int not null comment "评论人ID",
`gmt_create` bigint comment "创建时间",
`gmt_modified` bigint comment "更新时间",
`like_count` bigint default 0 comment "点赞数",
`comment` varchar (1024) comment "评论"
);
// 通知信息的表
create table `notification`(
`id` bigint auto_increment primary key ,
`notify_user` bigint not null,
`receive_user` bigint not null,
`outer` bigint not null,
`type` int not null comment "通知类型",
`gmt_create` bigint not null,
`status` int default 0
);
alter table notification add `notifier_name` varchar(100);
alter table notification add `outer_title` varchar(256);
1.org.apache.ibatis.binding.BindingException: Parameter '' not found. Available parameters are [arg1,
在mapper中参数过多 需要加入@Param注解
@Select("select * from question limit #{page},#{size}")
List<Question> paginationList(@Param("page") Integer page,@Param("size") Integer size);
应该取消@EnableWebMvc注解
JSON parse error: Unrecognized token 'parentId': was expecting ('true', 'false' or 'null'); nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'parentId': was expecting ('true', 'false' or 'null')
at [Source: (PushbackInputStream); line: 1, column: 10]
解决方法:JSON.stringify序列法JSON 将json转化成字符串
JSON.stringify({
"parentId":questionId,
"comment":comment_content,
"type":1
})