且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Spring Boot - 在类路径资源中定义名为'dataSource'的bean时出错

更新时间:2023-01-11 11:11:19

看起来最初的问题是自动配置。

Looks like the initial problem is with the auto-config.

如果您不需要数据源,只需将其从自动配置过程中删除:

If you don't need the datasource, simply remove it from the auto-config process:

@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})