个人博客项目Meblog遇到的坑及解决方案
问题1:新建spring mvc项目时,添加插件报错"plugin not found".
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
解决方案:
查找资料,发现指正版本号即可解决。
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!--指定版本号解决问题-->
<version>2.2.6.RELEASE</version>
</plugin>
问题2:构造addPost添加博文方法测试出现错误
Controller中的方法如下:
@ApiOperation(value = "增加一篇文章")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "文章主键", required = true, dataType = "Integer"),
@ApiImplicitParam(name = "title", value = "文章标题", required = true, dataType = "String"),
@ApiImplicitParam(name = "summary", value = "文章简介", required = true, dataType = "String"),
@ApiImplicitParam(name = "imgUrl", value = "文章题图url", required = true, dataType = "String"),
@ApiImplicitParam(name = "gmtCreate", value = "创建时间", required = true