Mybatis reports a circular dependency error when spring boot starts (recommended)
When I was working on the project, I wanted to use hot deployment to reduce the deployment time, so I added springboot devtools
Added dependency in maven
Then, when the project is started normally, it is found that the console keeps outputting errors, as shown in the figure
I don't know why, so I'm ready to debug the source code and enter mybatisautoconfiguration In Java
The place where the line is drawn is an error, and a null pointer is reported. What are the properties
This class is injected from spring. What is this class for and when is it injected? First look at the structure of this class
This is the application Configuration of mybatis in YML / properties.
Why can't the configuration be read? It was good before. It's supposed to be devtool. Just get rid of dependence.
summary
The above is a circular dependency error (recommended) reported by mybatis when springboot starts. I hope it will help you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!