环境配置和数据库连接
1.二次运行mybatis-generator,在已经生成了dataObject和Mapper的情况下,不会自动覆盖
解决:把生成的所有文件删除,再运行就可以
2.IntelliJ IDEA使用@AutoWired注解出现Could not autowire. No beans of ‘xxxx’ type found 的错误提示

解决:在@AutoWired注解后加上(required = false)
3.数据库连接:运行后出现警告解决:Establishing SSL connection without server‘s identity verification is not recommended. Accordin
解决决:https://blog.csdn.net/shaock2018/article/details/116571542
4.com.alibaba.druid.pool.DruidDataSource : {dataSource-1} inited
首先尝试改变mysql版本(不行),其次不使用阿里巴巴druid,更换数据源为tomcat。
出现了Initializing Spring DispatcherServlet,更改配置和依赖解决了问题。但是还是返回的数据不对。最后发现原因是数据库中插入的id值为40,但是查询操作用的id是1,查不到。
1885

被折叠的 条评论
为什么被折叠?



