Description: Failed to configure a DataSource: url attribute is not specified

@Description:Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.

Description:Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.Reason: Failed to determine a suitable driver class错误解决方法

在springboot启动服务时报错 提示 url attribute有问题
第一次: 在更换局域网后 忘记修改mysql datasource的url
之前:
spring:
application:
name: xxx-service
datasource:
username: root
password: root
url: jdbc:mysql://192.168.0.101:3306/xxx
修改为:
url: jdbc:mysql://127.0.0.1:3306/xxx

第二次
该服务依赖的 其他包中 依赖了需要提供 url 属性的包 需要将其排除 如:
```

        
        xxx
        xxxxxxxx
        1.0.0-SNAPSHOT
        
        	
            
                org.springframework.boot
                spring-boot-starter-jdbc
            
            
            
                mysql
                mysql-connector-java
            
        
    
    
    ```

你可能感兴趣的:(java)