异常 Failed to determine a suitable driver class
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)
启动类加上
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
还不行的话
可以尝试在pom.xml文件的build标签中加入如下内容:
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.yml</include>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.yml</include>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
还有就是用了多模块,没有扫到其他模块的配置可以在启动类添加如果包名前面相同的话 就是扩大扫描范围
scanBasePackages = {"com.pl"}