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).,
mapper.xml放在java下时,配置文件写mapper-locations: classpath:com/zyq/lxp/mapper/*.xml,xml的路径,
在pom中写
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
<include>**/*.yml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
不需要
src/main/resources
/*.properties
/.xml
**/.yml
false
否则会影响thymeleaf的页面映射规则