Hello, In my @SpringBootApplication class, I've d...
# spring
z
Hello, In my @SpringBootApplication class, I've defined the following function:
Copy code
@Bean
    fun init(dataSource: DataSource)
Intellij complains with a:
Copy code
"Could not autowire. There is more than one bean of 'DataSource' type"
dataSource (DataSourceConfiguration.class)
dataSource (DataSourceConfiguration.class)
Can someone tell me what I'm doing wrong please? Or explain to me why intellij is complaining? I'm somewhat confused by the duplication. Also curiously this compiles and appears to be working correctly during runtime, intellij bug?