Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.
启动时出现此异常 时启动类当中
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})
@EnableEurekaClient
public class FileApplication {
public static void main(String[] args) {
SpringApplication.run(FileApplication.class);
}
}
缺少exclude={DataSourceAutoConfiguration.class} 次注解可以忽略数据库源的必要