快速搭建SpringBoot
@GetMapping return “hello” 報"Check your ViewResolver setup!"
解決 : maven添加 thymeleaf
參考:https://blog.csdn.net/AV_woaijava/article/details/89336059
@GetMapping return new UserBean()報”template might not exist or might not be accessible by any of the configured Template"
解決:方法返回帶上@ResponseBody或者類註解換成@RestController
參考:https://blog.csdn.net/liming_0820/article/details/80878168
@Data 註解 沒有自己手動生成 get set方法,代碼報錯(可以運行)
解決:IDEA添加插件”lombok“,同時需要在maven添加lombok依賴
@Mapper報錯,java.lang.NoClassDefFoundError:org/apache/ibatis/annotations/Mapper
解決:mybatis 3.4.0版本以上才支持@Mapper註解(之前的是3.2)
參考:https://blog.csdn.net/weixin_41010294/article/details/88952335