欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

配置SpringCloud时错误:If you want an embedded database please put a supported one on the classpath

程序员文章站 2022-04-19 22:33:30
...

原文链接:https://blog.csdn.net/qq_32157851/article/details/85125139
在配置路由网关时错误:
需要正在主启动类的注解上加上:@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
即可解决错误

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableZuulProxy/*类似代理*/
public class Zuul_9527_StartSpringCloudApp {

	public static void main(String[] args) {
		SpringApplication.run(Zuul_9527_StartSpringCloudApp.class, args);
	}
}