Closed JunSilckTar closed 5 months ago
sorry, I use that way to configure DruidDataSource, other connection is correct
val druidDataSource = DruidDataSource()
druidDataSource.url = url
spring:
datasource:
url: jdbc:mysql://localhost:3306
type: com.alibaba.druid.pool.DruidDataSource
druid-spring-boot-starter version: 1.2.22 Springboot version: 2.6.13
Ktorm version: 3.6.0 dbType: mysql dbVersion: 8.0
Hi, I got a error when I run application with not set url for spring.database, like this
I set excuse for @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) kotlin: @SpringBootApplication(exclude = [DataSourceAutoConfiguration.class])
the error is " Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. "
But it is working if I set url, like this, and there is a connection on web! like this
I use that way to configure DruidDataSource, other connection is correct
I must set url for springboot.database else class org.springframework.boot.autoconfigure.jdbc.DataSourceBeanCreationException Failed to determine a suitable driver class. if I don't use druid, the error not come out
I wondering not put any configuration on application.properties or yaml, Is there a problem with my operation or a bug? I can't test
Thank you for your working!!! Regards.