新搭建的SpringBoot项目,启动报错Failed to determine suitable jdbc url
项目启动类
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
@SpringBootApplication
public class JinlongSystemWebApplication {
public static void main(String[] args) {
SpringApplication.run(JinlongSystemWebApplication.class, args);
}
}
application.properties配置
server:
port: 8090
spring:
application:
name: jinlong-system
datasource:
type: com.alibaba.druid.pool.DuridDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/jinlong?useUnicode=true&characterEncoding=utf-8
username: root
password:
mybatis:
mapper-locations: classpath:mybatis/mapper/*/*.xml
启动报错:
Failed to auto-configure a DataSource: 'spring.datasource.url' is not specified and no embedded datasource could be auto-configured.
Reason: Failed to determine suitable jdbc url
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 partic