Transferred to IntelliJ has been 1 months, the programming efficiency is really much faster than eclipse, and can directly use MAVEN, and then want to write a small project to play, architecture, thinking about everything, not the first time to play the frame, divert to die half a day can be completed, As a result, I never thought, full-time investment (fill) into (pit) spent half a day, and most of it is aimless trial and error, sweat, found out the problem on the Internet can not find the time is really headless flies.
The initial project structure is like this
Everything is ready. Run the test. Boot no problem, when the DAO method is requested, there is no unexpected error. As follows
Org.apache.ibatis.binding.BindingException:Invalid bound statement (not found): Com.fortuneshare.integral.IntegralGradeMapper.findAll
A look at the mistake I thought was yourself mapper.xml and MyBatis interface namespace is not configured to. Look closely but don't see the problem. Multiple recompilation restarts are also not a very handy. Suddenly notice the packet structure of the circled red box in the diagram, and then open idea's project structure to see the source of the modules, as
In idea, if the default package is empty, you merge the structure yourself, and when you create a folder, be sure to look at the project structure. Make sure that the folder structure is not merged.
Intellij16 creation of Spring-mybatis project Create (PIT) record, solve the idea under the XML file can not find the problem