目录
二、idea中新建了一个maven项目,不能在文件夹上新建java文件
一、关于通过Swagger查看接口浏览器跳出Unable to infer base url. This is common when using dynamic servlet registrat...
解决:POM包的依赖重新加载
二、idea中新建了一个maven项目,不能在文件夹上新建java文件
鼠标右击java---mark directory as----sources root
三、maven子项目没有继承父项目依赖
即:IDEA用MAVEN创建的项目没有maven选项
解决:①在pom.xml 文件上右键 Add as Maven Project ②在子模块上右键 Add as Maven Project
四、@cacheable 生效但是没有保存数据到Redis
什么错误都没报。。问题找了好久。
解决:新建的模块没有引入Redis配置
我的Redis配置写在这个模块中,需要在另一个模块引入
service_cms没有扫描到RedisConfig
CmsApplication主函数中添加扫描注解
@ComponentScan({"com.atguigu"}) //指定扫描位置
五、org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing异常
原因:requestbody对象值为空
@RequestBody需要使用Post提交