Eclipse has always been used, but many employees of the company use idea, so they want to try. Unexpectedly, after importing Maven project, they always report errors. Finally, they find that there is no XML file in Dao in the compiled target, resulting in errors when the listener loads resources
Finally, after repeated search, we finally found the answer
In pom.xml < build> Add to:
<resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> <filtering>true</filtering> </resource> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> Delete the target folder, recompile, and the project starts. Something magical happened, the project started. It's a real pain in the ass.
Similar Posts:
- [Solved] Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.
- [Solved] Springboot Error: invalid bound statement (not found)
- [Solved] Could not find resource com/cth/dao/UserImpl.xml & Single mapping file not found
- [Solved] Browser Error: Failed to decode downloaded font and OTS parsing error: Failed to convert *** font to ***
- [Solved] Mybatis Error: Invalid bound statement (not found)
- MyBatis Error: Error building SqlSession [How to Solve]
- [Solved] Mybatis Error: Invalid bound statement (not found)
- [Solved] Springboot Project mybatis Error: Invalid bound statement (not found)
- [Solved] Mybatis: the binding mapper cannot be found Error: Org.apache.ibatis.binding.bindingexception: invalid bound statement (not found)
- Eclipse debug has no response and no error report