在编译启动项目或者打包maven项目时有时会遇到:
1.明明代码都是正确的,mapper.xml文件映射也正确,但是报出mapper中sql语句未匹配,找不到xml文件,Invalid bound statement (not found)。
2.mysql配置是对的,SQLDriver和url也都配置了,但是报出找不到数据库配置。
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
3.找不到static下面静态文件,明明就在包里,却访问不到。
解决方法:
去检查编译后的target文件夹
看看