编译报错
***************************
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).
尝试做法
做法1(尝试无效)
SpringBoot注解改成 @SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
做法2(有效)
把pom.xml文件中打包方式由pom包换成jar包(直接删掉打包方式即可,默认jar)