my springboot version is 2.3.4-RELEASE , I configure DataSource by this way in application-dev.yml:

spring:
  profiles: dev
  datasource:
    master:
      driver-class-name: com.mysql.jdbc.Driver
      url: myUrl
    slave:
      driver-class-name: com.mysql.jdbc.Driver
      url: myUrl

when I active 'dev' profile, I can start my springBoot container successful, but when I restart my springBoot container , see this error:

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


Action:

Consider the following:
    If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
    If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).

I try to add the config : spring.datasource.url it can worker,but i need to distinguish master and slave , how can i do ? thanks!

Comment From: wilkinsona

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug. Also, please note that Spring Boot 2.3.x is no longer supported. Please upgrade to 2.6.x or 2.7.x.